chore: add fuse package

This commit is contained in:
Noah Hsu
2022-07-20 00:39:20 +08:00
parent 90a5c175ed
commit fb65e98fa3
4 changed files with 195 additions and 11 deletions

9
internal/fuse/mount.go Normal file
View File

@ -0,0 +1,9 @@
package fuse
import "github.com/winfsp/cgofuse/fuse"
func Mount(mountSrc, mountDst string, opts []string) {
fs := &Fs{RootFolder: mountSrc}
host := fuse.NewFileSystemHost(fs)
go host.Mount(mountDst, opts)
}