{"id":18418607,"url":"https://github.com/bsm/bfs","last_synced_at":"2025-10-17T00:52:28.130Z","repository":{"id":31965498,"uuid":"129373391","full_name":"bsm/bfs","owner":"bsm","description":"Multi-adapter bucket-based file system abstraction. #golang","archived":false,"fork":false,"pushed_at":"2024-12-11T22:23:11.000Z","size":460,"stargazers_count":14,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-22T19:02:42.847Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsm.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":"2018-04-13T08:33:41.000Z","updated_at":"2024-09-02T05:15:34.000Z","dependencies_parsed_at":"2023-01-14T20:13:10.703Z","dependency_job_id":"4f61ae7b-00df-4841-b4bb-dd74238c11eb","html_url":"https://github.com/bsm/bfs","commit_stats":null,"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fbfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fbfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fbfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fbfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsm","download_url":"https://codeload.github.com/bsm/bfs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247661668,"owners_count":20975096,"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":[],"created_at":"2024-11-06T04:14:07.455Z","updated_at":"2025-10-17T00:52:23.076Z","avatar_url":"https://github.com/bsm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BFS\n\n[![GoDoc](https://godoc.org/github.com/bsm/bfs?status.svg)](https://godoc.org/github.com/bsm/bfs)\n[![Test](https://github.com/bsm/bfs/actions/workflows/test.yml/badge.svg)](https://github.com/bsm/bfs/actions/workflows/test.yml)\n\nMulti-adapter bucket-based file system abstraction.\n\n## Documentation\n\nFor documentation and examples, please see https://godoc.org/github.com/bsm/bfs.\n\n## Install\n\n```\ngo get -u github.com/bsm/bfs\n```\n\n## Basic Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/bsm/bfs\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbucket := bfs.NewInMem()\n\n\t// Write object\n\to1, err := bucket.Create(ctx, \"nested/file.txt\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer o1.Discard()\n\n\tif _, err := o1.Write([]byte(\"TESTDATA\")); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := o1.Commit(); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Glob entries\n\tentries, err := bucket.Glob(ctx, \"nested/**\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(\"ENTRIES:\", entries)\n\n\t// Read object\n\to2, err := bucket.Open(ctx, \"nested/file.txt\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer o2.Close()\n\n\tdata, err := io.ReadAll(o2)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(\"DATA:\", string(data))\n\n\t// Head object\n\tinfo, err := bucket.Head(ctx, \"nested/file.txt\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"INFO: name=%q size=%d\\n\", info.Name, info.Size)\n\n\t// Delete object\n\tif err := bucket.Remove(ctx, \"nested/file.txt\"); err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Fbfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsm%2Fbfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Fbfs/lists"}