Hello I'm about to port my two almost working simple fuse filesystems from bazillion fuse to go-fuse. go-fuse api seems more complex. The question is:
NewServer()
, which RawFileSystem to use?WaitMount()
?DeleteNotify()
, EntryNotify()
?ok i found the solutions
1. make a struct that contains nodefs.Node:
type my_root struct {nodefs.Node}
initialize it
my = &my_root{Node: nodefs.NewDefaultNode()}
make a connection and a raw filesystem
con := nodefs.NewFileSystemConnector(my, nil)
raw := fuse.NewRawFileSystem(con.RawFS())
finally, fire up the fuse fs
server, err := fuse.NewServer(raw, f.dir, optz)
like this:
func (my_root) OpenDir(context *fuse.Context) ([]fuse.DirEntry, fuse.Status) {}
func (my_root) Lookup(out *fuse.Attr, name string, context *fuse.Context) (node *nodefs.Inode, code fuse.Status)
after step 1, like this:
server.WaitMount()
i didn't need this.