{"id":39175537,"url":"https://github.com/xbsoftware/wfs","last_synced_at":"2026-01-17T22:28:05.384Z","repository":{"id":46125401,"uuid":"243038497","full_name":"xbsoftware/wfs","owner":"xbsoftware","description":"Web File System - core interface","archived":false,"fork":false,"pushed_at":"2025-01-16T09:56:39.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-16T11:05:32.378Z","etag":null,"topics":["go","webix","wfs"],"latest_commit_sha":null,"homepage":"https://webix.com/filemanager","language":"Go","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":"2020-02-25T15:47:00.000Z","updated_at":"2025-01-16T09:56:41.000Z","dependencies_parsed_at":"2022-09-26T21:31:29.522Z","dependency_job_id":null,"html_url":"https://github.com/xbsoftware/wfs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xbsoftware/wfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fwfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fwfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fwfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fwfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xbsoftware","download_url":"https://codeload.github.com/xbsoftware/wfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbsoftware%2Fwfs/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":["go","webix","wfs"],"created_at":"2026-01-17T22:28:05.322Z","updated_at":"2026-01-17T22:28:05.378Z","avatar_url":"https://github.com/xbsoftware.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Web File System - core interface\n=========\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## API\n\n### Initialization\n\n```go\nimport (\n\t\"github.com/xbsoftware/wfs-local\"\n)\n\nfs, err := wfs.NewLocalDrive(\"./sandbox\", nil)\n```\n\n### Get data\n\n```go\n//get files in a folder\nfiles, err := fs.List(\"/subfolder\");\n\n//get files in a folder and subfolders as plain list\nfiles, err = fs.List(\"/subfolder\", \u0026wfs.ListConfig{ SubFolders: true });\n\n//get files in a folder and subfolders as nested structure\nfiles, err = fs.List(\"/subfolder\", \u0026wfs.ListConfig{ SubFolders: true, Nested:true });\n\n//get folder only\nfiles, err = fs.List(\"/subfolder\", \u0026wfs.ListConfig{ SkipFiles: true });\n\n//get files that match a mask\nfiles, err = fs.List(\"/subfolder\", \u0026wfs.ListConfig{\n    Include: func(file string) bool { return strings.HasSufix(file, \".txt\") },\n});\n\n//ignore some files\nfiles, err = fs.List(\"/subfolder\", \u0026wfs.ListConfig{\n    Exclude: func(file string) bool { return file == \".git\" },\n});\n\n//get info about a single file\ninfo, err = fs.Info(\"some.txt\");\n\n//check if file exists\ncheck := fs.Exists(\"some.txt\");\n```\n\n### Modify files\n\n```go\n//make folder\nfs.Make(\"/\", \"sub2\", true);\n\n//make file\nfs.Make(\"/\", \"my.txt\", false);\n\n//remove\nfs.Remove(\"some.txt\");\n\n//copy\nfs.Copy(\"some.txt\", \"/sub/\", \"\");\n\n//copy as\nfs.Copy(\"some.txt\", \"/sub/\", \"other.txt\");\n\n//move\nfs.Move(\"some.txt\", \"/data/\", \"\");\n\n//rename\nfs.Move(\"some.txt\", \"\", \"some-data.txt\");\n\n//read\nreader, err := fs.Read(\"some.txt\");\n\n//write\nfs.Write(\"some.txt\", writer)\n```\n\n### Configuration\n\n```go\n// Access policies\n// ForceRoot policy is added automatically\nfs, err := wfs.NewLocalDrive(\"./sandbox\", \u0026wfs.DriveConfig{\n    Policy: \u0026ReadOnlyPolicy{},\n})\n\n// Logging\nfs, err := wfs.NewLocalDrive(\"./sandbox\", \u0026wfs.DriveConfig{\n    Verbose:true\n})\n\n// Exec operation with different config\npath, err := fs.WithOperationConfig(\u0026OperationConfig{\n    PreventNameCollision:true,\n}).Make(\"/\", \"some\", true)\n```\n\n### License \n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbsoftware%2Fwfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxbsoftware%2Fwfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbsoftware%2Fwfs/lists"}