{"id":28364451,"url":"https://github.com/go-git/go-billy","last_synced_at":"2025-06-23T15:31:20.981Z","repository":{"id":46417246,"uuid":"246113572","full_name":"go-git/go-billy","owner":"go-git","description":"The missing interface filesystem abstraction for Go","archived":false,"fork":false,"pushed_at":"2025-06-03T09:53:50.000Z","size":503,"stargazers_count":353,"open_issues_count":18,"forks_count":48,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-16T03:32:29.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/go-git/go-billy/v5","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/go-git.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,"zenodo":null}},"created_at":"2020-03-09T18:35:04.000Z","updated_at":"2025-06-03T09:53:50.000Z","dependencies_parsed_at":"2023-11-20T22:24:56.106Z","dependency_job_id":"97b91b4f-4542-4761-88e0-257cd136982f","html_url":"https://github.com/go-git/go-billy","commit_stats":{"total_commits":207,"total_committers":34,"mean_commits":6.088235294117647,"dds":0.6473429951690821,"last_synced_commit":"1bb3aa54c166c2384e0acf4d4e595911230c209e"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/go-git/go-billy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-git%2Fgo-billy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-git%2Fgo-billy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-git%2Fgo-billy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-git%2Fgo-billy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-git","download_url":"https://codeload.github.com/go-git/go-billy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-git%2Fgo-billy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260210174,"owners_count":22975334,"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":"2025-05-28T20:44:28.731Z","updated_at":"2025-06-23T15:31:20.973Z","avatar_url":"https://github.com/go-git.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-billy [![GoDoc](https://godoc.org/gopkg.in/go-git/go-billy.v6?status.svg)](https://pkg.go.dev/github.com/go-git/go-billy/v6) [![Test](https://github.com/go-git/go-billy/workflows/Test/badge.svg)](https://github.com/go-git/go-billy/actions?query=workflow%3ATest) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/go-git/go-billy/badge)](https://scorecard.dev/viewer/?uri=github.com/go-git/go-billy)\n\nThe missing interface filesystem abstraction for Go.\nBilly implements an interface based on the `os` standard library, allowing to develop applications without dependency on the underlying storage. Makes it virtually free to implement mocks and testing over filesystem operations.\n\nBilly was born as part of [go-git/go-git](https://github.com/go-git/go-git) project.\n\n## Installation\n\n```go\nimport \"github.com/go-git/go-billy/v6\" // with go modules enabled (GO111MODULE=on or outside GOPATH)\nimport \"github.com/go-git/go-billy\" // with go modules disabled\n```\n\n## Usage\n\nBilly exposes filesystems using the\n[`Filesystem` interface](https://pkg.go.dev/github.com/go-git/go-billy/v6?tab=doc#Filesystem).\nEach filesystem implementation gives you a `New` method, whose arguments depend on\nthe implementation itself, that returns a new `Filesystem`.\n\nThe following example caches in memory all readable files in a directory from any\nbilly's filesystem implementation.\n\n```go\nfunc LoadToMemory(origin billy.Filesystem, path string) (*memory.Memory, error) {\n\tmemory := memory.New()\n\n\tfiles, err := origin.ReadDir(\"/\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, file := range files {\n\t\tif file.IsDir() {\n\t\t\tcontinue\n\t\t}\n\n\t\tsrc, err := origin.Open(file.Name())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tdst, err := memory.Create(file.Name())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif _, err = io.Copy(dst, src); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif err := dst.Close(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif err := src.Close(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn memory, nil\n}\n```\n\n## Why billy?\n\nThe library billy deals with storage systems and Billy is the name of a well-known, IKEA\nbookcase. That's it.\n\n## License\n\nApache License Version 2.0, see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-git%2Fgo-billy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-git%2Fgo-billy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-git%2Fgo-billy/lists"}