{"id":14384956,"url":"https://github.com/anandkumarpatel/rest-fs","last_synced_at":"2026-03-13T11:32:47.512Z","repository":{"id":16793236,"uuid":"19551819","full_name":"anandkumarpatel/rest-fs","owner":"anandkumarpatel","description":"restful interface to a filesystem.","archived":false,"fork":false,"pushed_at":"2019-11-04T14:49:05.000Z","size":107,"stargazers_count":17,"open_issues_count":3,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-17T05:56:32.251Z","etag":null,"topics":[],"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/anandkumarpatel.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-05-07T21:59:06.000Z","updated_at":"2022-02-06T16:56:38.000Z","dependencies_parsed_at":"2022-07-14T12:17:33.059Z","dependency_job_id":null,"html_url":"https://github.com/anandkumarpatel/rest-fs","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/anandkumarpatel/rest-fs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anandkumarpatel%2Frest-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anandkumarpatel%2Frest-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anandkumarpatel%2Frest-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anandkumarpatel%2Frest-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anandkumarpatel","download_url":"https://codeload.github.com/anandkumarpatel/rest-fs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anandkumarpatel%2Frest-fs/sbom","scorecard":{"id":191133,"data":{"date":"2025-08-11","repo":{"name":"github.com/anandkumarpatel/rest-fs","commit":"2abd5f17585d7fdeb80d5d2253e40f4b74433509"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":3,"reason":"Found 6/17 approved changesets -- score normalized to 3","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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":-1,"reason":"no dependencies found","details":null,"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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 20 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"}}]},"last_synced_at":"2025-08-16T20:42:01.088Z","repository_id":16793236,"created_at":"2025-08-16T20:42:01.088Z","updated_at":"2025-08-16T20:42:01.088Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30466314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-08-28T18:01:48.727Z","updated_at":"2026-03-13T11:32:47.495Z","avatar_url":"https://github.com/anandkumarpatel.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"rest-fs\n=====\n\nrestful interface to a filesystem\n\nusage\n=====\n`npm install rest-fs`\n\nto install\n\n`npm start`\n\nstarts fileserver on port 3000\n\n`npm test`\n\nruns various file and folder test\n\n`npm start`\n\nstarts server on port 3000 of your entire system\n\n`LOG=true`\nfor access log\n\n`DEBUG=*`\nfor debug info\n\n```\napp = require('express')();\nrestfs = require('rest-fs')\nrestfs(app);\napp.listen(3000)\n```\nTo use programmatically, pass in the app into restfs and it will add the routes.\nyou can attach a function to modifyOut to manipulate file output.\nthe function has one argument which is the full filepath and should return path to return\n\n## ETags\n\n\nrest-fs supports ETags by default. Each api endpoint will return a *strict* `ETag` header\nthat clients can utilize when making subsequent requests. Please see\n[http://en.wikipedia.org/wiki/HTTP_ETag](this article) for more information on using ETags.\n\n\nAPI\n===\n\n\nGET /path/to/dir/\n-----------------\n  list contents of directory\n\n  *optional*\u003cbr\u003e\n  ?recursive = list recursively default false\n\n  returns: list of full file or folder paths (trailing slash tells if dir)\n\n  ```\n  res.body = [ { \"fullDirPath\" }, ... ]\n  ```\n\n#### File Stats\n  ?stats = Return file stats for the directory instead of file listing.\n\n  ```\n  res.body = {\n    dev: 16777220,\n    mode: 16877,\n    nlink: 31,\n    uid: 501,\n    gid: 20,\n    rdev: 0,\n    blksize: 4096,\n    ino: 604862,\n    size: 1054,\n    blocks: 0,\n    atime: Thu Mar 05 2015 11:38:47 GMT-0800 (PST),\n    mtime: Thu Mar 05 2015 10:52:41 GMT-0800 (PST),\n    ctime: Thu Mar 05 2015 10:52:41 GMT-0800 (PST)\n  }\n  ```\n\nGET /path/to/file\n-----------------\n  returns contents of file\u003cbr\u003e\n  if dir, redirect to dir path\n\n  *optional*\u003cbr\u003e\n  ?encoding = default utf8\n\n  returns:\n  res.body = { \"file content\" }\n\n#### File Stats\n  ?stats = Return file stats for the file instead of file's contents.\n\n  ```\n  res.body = {\n    dev: 16777220,\n    mode: 16877,\n    nlink: 31,\n    uid: 501,\n    gid: 20,\n    rdev: 0,\n    blksize: 4096,\n    ino: 604862,\n    size: 1054,\n    blocks: 0,\n    atime: Thu Mar 05 2015 11:38:47 GMT-0800 (PST),\n    mtime: Thu Mar 05 2015 10:52:41 GMT-0800 (PST),\n    ctime: Thu Mar 05 2015 10:52:41 GMT-0800 (PST)\n  }\n  ```\n\nPOST /path/to/file/or/dir\n-------------------------\n  creates or overwrites file\u003cbr\u003e\n  creates dir if it does not exist.\u003cbr\u003e\n  renames or moves file if newPath exists\u003cbr\u003e\n\n  *optional*\u003cbr\u003e\n  body.newpath = if exist, move/rename file to this location.\u003cbr\u003e\n  body.clobber = if true will overwrite dest files (default false)\u003cbr\u003e\n  body.mkdirp = if true will create path to new location (default false)\u003cbr\u003e\n  body.mode = permissions of file (defaults: file 438(0666) dir 511(0777))\u003cbr\u003e\n  body.encoding = default utf8\n\n  *optional for stream*\u003cbr\u003e\n  query.clobber = overwrite if exist\n  query.mode = permissions of file (defaults: file 438(0666) dir 511(0777))\u003cbr\u003e\n  query.encoding = default utf8\n\n  returns: modified resource. (trailing slash tells if dir)\n  ```\n  req.body = { \"fullFileOrDirPath\" }\n  ```\n\nPUT /path/to/file\n-----------------\n  creates file\n\n  *optional*\u003cbr\u003e\n  body.mode = permissions of file (438 default 0666 octal)\u003cbr\u003e\n  body.encoding = default utf8\n\n  returns: modified resource (trailing slash tells if dir)\n  ```\n  req.body = { \"fullFilePath\" }\n  ```\n\nDEL /path/to/dir/\n-----------------\n  deletes folder\u003cbr\u003e\n  if file returns error\n\n  returns:\n  ```\n  req.body = {}\n  ```\n\nDEL /path/to/file\n-----------------\n  deletes file\u003cbr\u003e\n  if folder returns error\n\n  returns:\n  ```\n  req.body = {}\n  ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandkumarpatel%2Frest-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanandkumarpatel%2Frest-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandkumarpatel%2Frest-fs/lists"}