{"id":15637653,"url":"https://github.com/psanford/memfs","last_synced_at":"2025-05-16T17:03:30.750Z","repository":{"id":46770033,"uuid":"327799709","full_name":"psanford/memfs","owner":"psanford","description":"In-memory implementation of Go's `io/fs.FS` interface","archived":false,"fork":false,"pushed_at":"2024-10-19T19:17:26.000Z","size":16,"stargazers_count":113,"open_issues_count":1,"forks_count":19,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T15:57:57.832Z","etag":null,"topics":["go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psanford.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-08T04:37:18.000Z","updated_at":"2025-03-08T13:53:29.000Z","dependencies_parsed_at":"2024-10-23T04:07:46.874Z","dependency_job_id":null,"html_url":"https://github.com/psanford/memfs","commit_stats":{"total_commits":16,"total_committers":5,"mean_commits":3.2,"dds":0.3125,"last_synced_commit":"4ef911798f9bffd5efa9346abd6e81ff3896d114"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psanford%2Fmemfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psanford%2Fmemfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psanford%2Fmemfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psanford%2Fmemfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psanford","download_url":"https://codeload.github.com/psanford/memfs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254573589,"owners_count":22093731,"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","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"],"created_at":"2024-10-03T11:12:24.904Z","updated_at":"2025-05-16T17:03:30.731Z","avatar_url":"https://github.com/psanford.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# memfs: A simple in-memory io/fs.FS filesystem\n\nmemfs is an in-memory implementation of Go's io/fs.FS interface.\nThe goal is to make it easy and quick to build an fs.FS filesystem\nwhen you don't have any complex requirements.\n\nDocumentation: https://pkg.go.dev/github.com/psanford/memfs\n\n`io/fs` docs: https://tip.golang.org/pkg/io/fs/\n\n## Usage\n\n```\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io/fs\"\n\n\t\"github.com/psanford/memfs\"\n)\n\nfunc main() {\n\trootFS := memfs.New()\n\n\terr := rootFS.MkdirAll(\"dir1/dir2\", 0777)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\terr = rootFS.WriteFile(\"dir1/dir2/f1.txt\", []byte(\"incinerating-unsubstantial\"), 0755)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\terr = fs.WalkDir(rootFS, \".\", func(path string, d fs.DirEntry, err error) error {\n\t\tfmt.Println(path)\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tcontent, err := fs.ReadFile(rootFS, \"dir1/dir2/f1.txt\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"%s\\n\", content)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsanford%2Fmemfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsanford%2Fmemfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsanford%2Fmemfs/lists"}