https://github.com/tim-koehler/go-filesystree
Go-FilesysTree is a package to maybe help others with building a file-system like tree data structure in Golang.
https://github.com/tim-koehler/go-filesystree
file-tree filesystem golang tree tree-structure
Last synced: 14 days ago
JSON representation
Go-FilesysTree is a package to maybe help others with building a file-system like tree data structure in Golang.
- Host: GitHub
- URL: https://github.com/tim-koehler/go-filesystree
- Owner: tim-koehler
- Created: 2020-11-27T12:43:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-07T22:06:49.000Z (over 5 years ago)
- Last Synced: 2025-03-10T18:28:52.957Z (over 1 year ago)
- Topics: file-tree, filesystem, golang, tree, tree-structure
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go-FilesysTree  [](https://coveralls.io/github/tim-koehler/go-filesystree?branch=master) [](https://goreportcard.com/report/github.com/tim-koehler/go-filesystree)
Go-FilesysTree is a package which I build for another project but decided to publish to maybe help others with building a file system like
tree data structure in Golang.
## Getting Started
```bash
go get github.com/tim-koehler/go-filesystree
```
### Examples
```go
func main() {
fileList := []string{
"/foo/bar/baz.txt",
"/foo/bar/a.txt",
"/foo/bar/x.go",
"/tmp/a/b.c",
"/tmp/b/c.c",
"/tmp/b/d.c"}
fst := New()
for _, s := range fileList {
fst.AddFile(s, Metadata{
"Date": time.Now().String(),
})
}
}
```
...🚧 work in progress 🚧...