{"id":15638104,"url":"https://github.com/perry-mitchell/webdav-fs","last_synced_at":"2025-09-06T22:35:05.760Z","repository":{"id":41333607,"uuid":"44629916","full_name":"perry-mitchell/webdav-fs","owner":"perry-mitchell","description":"Node fs wrapper for WebDAV","archived":false,"fork":false,"pushed_at":"2022-11-21T11:56:36.000Z","size":504,"stargazers_count":95,"open_issues_count":10,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-04T13:39:52.624Z","etag":null,"topics":["client","filesystem","request","webdav","webdav-client"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perry-mitchell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-20T19:27:28.000Z","updated_at":"2025-04-28T07:00:51.000Z","dependencies_parsed_at":"2022-07-25T22:18:15.767Z","dependency_job_id":null,"html_url":"https://github.com/perry-mitchell/webdav-fs","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/perry-mitchell/webdav-fs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fwebdav-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fwebdav-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fwebdav-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fwebdav-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perry-mitchell","download_url":"https://codeload.github.com/perry-mitchell/webdav-fs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fwebdav-fs/sbom","scorecard":{"id":728116,"data":{"date":"2025-08-11","repo":{"name":"github.com/perry-mitchell/webdav-fs","commit":"2d34ae5a7cd36436f516b54b001bd370239cd188"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/perry-mitchell/webdav-fs/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/perry-mitchell/webdav-fs/test.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 2/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"28 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-c2jc-4fpr-4vhg","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-x3cc-x39p-42qx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-rqff-837h-mm52","Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2","Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j","Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T13:29:48.706Z","repository_id":41333607,"created_at":"2025-08-22T13:29:48.706Z","updated_at":"2025-08-22T13:29:48.706Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273973767,"owners_count":25200575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","filesystem","request","webdav","webdav-client"],"created_at":"2024-10-03T11:18:33.029Z","updated_at":"2025-09-06T22:35:05.733Z","avatar_url":"https://github.com/perry-mitchell.png","language":"JavaScript","readme":"# WebDAV-FS\n\u003e Node FS wrapper for WebDAV services\n\nNode `fs` wrapper for WebDAV. Perform basic filesystem tasks in a similar manner to using async `fs` methods like `readdir` and `writeFile`. `webdav-fs` uses [`webdav-client`](https://github.com/perry-mitchell/webdav-client) under the hood.\n\n![build status](https://github.com/perry-mitchell/webdav-fs/actions/workflows/test.yml/badge.svg) [![npm version](https://badge.fury.io/js/webdav-fs.svg)](https://www.npmjs.com/package/webdav-fs) [![npm downloads](https://img.shields.io/npm/dm/webdav-fs.svg)](https://www.npmjs.com/package/webdav-fs)\n\n## Installation\n\nInstall webdav-fs using npm:\n\n```\nnpm install webdav-fs --save\n```\n\nSupports NodeJS 14 and above. For Node 10, use v3, for Node 8, use v2.\n\n## Examples\n\nYou can use webdav-fs in authenticated or non-authenticated mode:\n\n```typescript\n// Using authentication:\nimport { createAdapter } from \"webdav-fs\";\n\nconst wfs = createAdapter(\"http://example.com/webdav/\", {\n    username: \"username\",\n    password: \"password\"\n});\n\nwfs.readdir(\"/Work\", (err, contents) =\u003e {\n    if (!err) {\n        console.log(\"Dir contents:\", contents);\n    } else {\n        console.log(\"Error:\", err.message);\n    }\n});\n```\n\n```typescript\n// Without using authentication:\nimport { createAdapter } from \"webdav-fs\";\n\nconst wfs = createAdapter(\"http://example.com/webdav/\");\n\nwfs.stat(\"/report.docx\", (err, data) =\u003e {\n    console.log(\"Is file:\", data.isFile());\n});\n```\n\nFor more control over the HTTP/TLS connection options, you can pass an instance of [`http.Agent`](https://nodejs.org/api/http.html#http_class_http_agent)\n or [`https.Agent`](https://nodejs.org/api/https.html#https_class_https_agent):\n\n```typescript\nimport { Agent } from \"https\";\nimport { createAdapter } from \"webdav-fs\";\n\nconst agent = new Agent({\n    keepAlive: true\n    // we can also control certificate verification behaviour here\n});\n\nconst wfs = createAdapter(\"https://example.com/webdav/\", {\n    username: \"username\",\n    password: \"password\",\n    httpsAgent: agent\n});\n```\n\n## API\n\nThe following methods are available on the `webdav-fs` module:\n\n### createReadStream(path[, options])\n\nCreate a read stream on a remote file:\n\n```typescript\nwfs\n    .createReadStream(\"/dir/somefile.dat\")\n    .pipe(fs.createWriteStream(\"./somefile.dat\"));\n```\n\nThe `options` object supports overriding remote `headers` as well as a range (`start` and `end` as byte indexes). When specifying a range, only the `start` value is required (if `end` is not provided the rest of the file is read).\n\nThe following requests the first 300 bytes of a file:\n\n```typescript\nconst myPartialStream = wfs.createReadStream(\"/dir/somefile.dat\", { start: 0, end: 299 });\n```\n\n### createWriteStream(path[, options])\n\nCreate a write stream for a remote file:\n\n```typescript\nfs\n    .createReadStream(\"./myFile.dat\")\n    .pipe(wfs.createWriteStream(\"/data/myFile.dat\"));\n```\n\nThe `options` object supports overriding remote `headers`.\n\n### mkdir(path, callback)\n\nCreate a remote directory:\n\n```typescript\nwfs.mkdir(\"/remote/dir\", err =\u003e {\n    // handle error if truthy\n});\n```\n\n### readdir(path[, mode], callback)\n\nRead the contents of a remote directory:\n\n```typescript\nwfs.readdir(\"/some/remote/path/\", \"node\", (err, contents) =\u003e {\n    // callback is an array of filenames\n});\n```\n\n`mode` is an optional processing mode, where:\n\n * 'node' (the default mode) will output an array of filename strings\n * 'stat' will output an array of stat objects (plus a `name` field)\n\n### readFile(path, [encoding,] callback)\n\nRead the contents of a remote file:\n\n```typescript\nwfs.readFile(\"/website/index.php\", \"utf8\", (err, data) =\u003e {\n    // data is the contents of the file\n    // encoding is optional\n});\n```\n\n`encoding` is optional and can be either `utf8` (default - returns a string) or `binary` (returns a `Buffer`).\n\n### rename(currentPath, destinationPath, callback)\n\nMove/rename a file to another location/name. This does not create new directories for nested files (moving a file into a new directory will not work).\n\n```typescript\nwfs.rename(\"/my-document.docx\", \"/Documents/personal.docx\", err =\u003e {\n    // handle error\n});\n```\n\n### stat(path, callback)\n\nStat a remote file:\n\n```typescript\nwfs.stat(\"/the-internet.dat\", (err, fileStat) =\u003e {\n    console.log(fileStat);\n});\n```\n\nA stat has the following properties:\n\n| Property | Type | Description |\n| -------- | ---- | ----------- |\n| isFile   | Function | Check if the item is a file |\n| isDirectory | Function | Check if the item is a directory |\n| mtime | Number | Last modification timestamp |\n| size | Number | Size of the item in bytes |\n\n### unlink(path, callback)\n\nDelete a remote file or directory:\n\n```typescript\nwfs.unlink(\"/remote/path\", (err) =\u003e {\n    // handle error if truthy\n});\n```\n\n### writeFile(path, data, [encoding,] callback)\n\nWrite data to a remote file:\n\n```typescript\nwfs.writeFile(\"/Temp/im-here.txt\", \"This is a saved file! REALLY!!\", err =\u003e {\n    if (err) {\n        console.error(err.message);\n    }\n});\n```\n\n`writeFile` supports writing binary files as well:\n\n```typescript\nfs.readFile(sourceFile, \"binary\", (err, data) =\u003e {\n    wfs.writeFile(destFile, data, \"binary\", function(err) {\n        // handle error\n    });\n});\n```\n\n`writeFile` supports just a couple of encodings:\n * utf8\n * binary\n\nWhen writing binary files, data must either be a binary string from a read file in Node (then passed to `new Buffer(data, \"binary\")`) or a Buffer.\n\n## Usage\n\n### Browser usage and CORS\nThis library isn't exactly designed for use within the browser, although it might work if bundled using a tool like Webpack.\n\nWhen in the browser take care with policies such as CORS - If the server is not configured correctly WebDAV requests will fail. Make sure that you return the correct CORS headers. Issues surrounding CORS errors without any indication that an error lies in this library will be closed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperry-mitchell%2Fwebdav-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperry-mitchell%2Fwebdav-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperry-mitchell%2Fwebdav-fs/lists"}