This library is just a wrapper to easily mount fs.FS as a filesystem.
Dependencies:
Windows:
winget install dokan-dev.Dokany
Linux(Ubuntu)
apt install fuse
package main
import (
"os"
"github.com/binzume/fsmount"
)
func main() {
mount, _ := fsmount.MountFS("X:", os.DirFS("."), nil)
defer mount.Close()
// Block forever
select {}
}
See examples/writable/writable.go
go run ./examples/writable testdir R:
type WritableFS interface {
fs.FS
OpenWriter(name string, flag int) (io.WriteCloser, error)
Truncate(name string, size int64) error
}
Other interfaces such as RemoveFS, MkdirFS, RenameFS... are also available.
MIT