fs.FS in the Go standard library is recommended.
Only the following packages in this library implement the fs.FS interface.
- httpfs
- zipfs
- fuse => Move to https://github.com/binzume/fsmount
- Consistent API for multiple backends.
- Easy to implement backends.
- FUSE support (Windows/Linux)
- TODO: fs.FS interface
- local storage
- memory
- zip (Readonly)
- http (Readonly)
vol := volume.NewLocalVolume("/var/contents")
// equiv: r, err := os.Open("/var/contents/hello.txt")
r, err := vol.Open("hello.txt")
vol := volume.NewVolumeGroup()
vol.AddVolume("aaa", volume.NewLocalVolume("/var/contents_a"))
vol.AddVolume("bbb/data", volume.NewLocalVolume("/var/contents_b"))
// equiv: r, err := os.Open("/var/contents_a/hello.txt")
r, err := vol.Open("aaa/hello.txt")
// equiv: r, err := os.Open("/var/contents_b/index.html")
r, err := vol.Open("bbb/data/index.html")
vol := httpvolume.NewHTTPVolume("", false)
r, err := vol.Open("https://example.com/hoge.txt")