{"id":39175515,"url":"https://github.com/xbsoftware/node-wfs-local","last_synced_at":"2026-01-17T22:28:04.547Z","repository":{"id":57410254,"uuid":"162489983","full_name":"xbsoftware/node-wfs-local","owner":"xbsoftware","description":"Web file system - \"local files\" driver for Node","archived":false,"fork":false,"pushed_at":"2025-04-03T13:48:45.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-27T12:16:51.708Z","etag":null,"topics":["node","webix","wfs"],"latest_commit_sha":null,"homepage":"https://webix.com/filemanager","language":"TypeScript","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/xbsoftware.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":"2018-12-19T20:56:55.000Z","updated_at":"2025-04-03T13:48:49.000Z","dependencies_parsed_at":"2022-08-29T08:31:11.482Z","dependency_job_id":null,"html_url":"https://github.com/xbsoftware/node-wfs-local","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/xbsoftware/node-wfs-local","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fnode-wfs-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fnode-wfs-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fnode-wfs-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fnode-wfs-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xbsoftware","download_url":"https://codeload.github.com/xbsoftware/node-wfs-local/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fnode-wfs-local/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28520503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"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":["node","webix","wfs"],"created_at":"2026-01-17T22:28:04.471Z","updated_at":"2026-01-17T22:28:04.533Z","avatar_url":"https://github.com/xbsoftware.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Web File System - Local files driver\n=========\n\n[![npm version](https://badge.fury.io/js/wfs-local.svg)](https://badge.fury.io/js/wfs-local) \n\nFile system abstraction with access management.\n\nAPI provides common file operations for some folder on local drive. Any operations outside of the folder will be blocked. Also, it possible to configure a custom policy for read/write operations.\n\n\nCan be used as backend for Webix File Manager https://webix.com/filemanager\n\n\n## API\n\n### Get data\n\n```js\nconst wfs = require(\"wfs-local\");\nconst fs = new wfs.LocalFiles(\"/temp/folder\");\n\n// get files in a folder\nlet files = await fs.list(\"/subfolder\");\n\n// get files in a folder and subfolders as plain list\nlet files = await fs.list(\"/subfolder\", { subFolders: true });\n\n// get files in a folder and subfolders as nested structure\nlet files = await fs.list(\"/subfolder\", { subFolders: true, nested:true });\n\n// get folder only\nlet files = await fs.list(\"/subfolder\", { skipFiles: true });\n\n// get files that match a mask\nlet files = await fs.list(\"/subfolder\", { include: file =\u003e file.value.includes(\"name\")});\n\n// get files with specific types\nlet files = await fs.list(\"/subfolder\", { include: file =\u003e [\"txt\",\"doc\"].includes(file.type) });\n\n// get files created on or after January 1, 2025\nlet files = await fs.list(\"/subfolder\", { include: file =\u003e new Date(file.date) \u003e= new Date(\"2025-01-01\")});\n\n// get files smaller than 1 MB\nlet files = await fs.list(\"/subfolder\", { include: file =\u003e file.size \u003c 1024*1024});\n\n// ignore some files\nlet files = await fs.list(\"/subfolder\", { exclude: file =\u003e file.value === \".git\" });\n\n// get info about a single file\nlet info = await fs.info(\"some.txt\");\n\n// check if file exists\nlet check = await fs.exists(\"some.txt\");\n```\n\n### Modify files\n\n```js\n// make folder\nawait fs.mkdir(\"sub2\");\n\n// remove\nawait fs.remove(\"some.txt\");\n\n// copy\nawait fs.copy(\"some.txt\", \"/sub/\");\n\n// move\nawait fs.copy(\"some.txt\", \"some-data.txt\");\n\n// read\nlet stream = await fs.read(\"some.txt\");\n\n// write\nawait fs.write(\"some.txt\", stream)\n```\n\n### Access Policy\n\n```js\n// ForceRoot policy is added automatically\n\n// readonly\nconst wfs = require(\"wfs-local\");\nconst fs = new wfs.LocalFiles(\"/temp/folder\", new wfs.policies.ReadOnlyPolicy());\n\n// custom\nconst fs = new wfs.LocalFiles(\"/temp/folder\", {\n    comply: (path, op) =\u003e {\n        if (op == wfs.Operation.Read) return true;\n        // write to temp folder only\n        if (file.indexOf(\"/path/\") === 0) return true;\n\n        return false;\n    }\n});\n```\n\n### Other API\n\n```js\n// logging\nconst wfs = require(\"wfs-local\");\nconst fs = new wfs.LocalFiles(\"/temp/folder\", null, { verbose: true });\n```\n\n\n## License \n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbsoftware%2Fnode-wfs-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxbsoftware%2Fnode-wfs-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbsoftware%2Fnode-wfs-local/lists"}