func (rf *RufsFuse) Open(name string, flags uint32, context *fuse.Context) (file nodefs.File, code fuse.Status) {
	return &RufsFile{nodefs.NewDefaultFile(), path.Join("/", name), rf.Tree}, fuse.OK
}
/*
Open file handling.
package export
import (
	"log"
	"os"
	"path"
	"path/filepath"
	"devt.de/krotik/rufs"
	"github.com/hanwen/go-fuse/v2/fuse"
	"github.com/hanwen/go-fuse/v2/fuse/nodefs"
	"github.com/hanwen/go-fuse/v2/fuse/pathfs"
)
type RufsFuse struct {
	pathfs.FileSystem
	Tree *rufs.Tree
}
func (rf *RufsFuse) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status) {
	if name == "" {
		return &fuse.Attr{
			Mode: fuse.S_IFDIR | 0755,
		}, fuse.OK
	}
	var a *fuse.Attr
	status := fuse.ENOENT
	name = path.Join("/", name)
	dir, file := filepath.Split(name)
	_, fis, err := rf.Tree.Dir(dir, "", false, false)
	if err != nil {
		log.Print(err)
		status = fuse.EIO
	}
	if len(fis) > 0 {
		for _, fi := range fis[0] {
			if fi.Name() == file {
				a = &fuse.Attr{
					Mode: OSModeToFuseMode(fi.Mode()),
					Size: uint64(fi.Size()),
				}
				status = fuse.OK
			}
		}
	}
	return a, status
}
func (rf *RufsFuse) OpenDir(name string,
	context *fuse.Context) ([]fuse.DirEntry, fuse.Status) {
	var c []fuse.DirEntry
	name = path.Join("/", name)
	status := fuse.ENOENT
	_, fis, err := rf.Tree.Dir(name, "", false, false)
	if err != nil {
		LogError(err)
		return nil, fuse.EIO
	}
	if len(fis) > 0 {
		for _, fi := range fis[0] {
			c = append(c, fuse.DirEntry{
				Name: fi.Name(),
				Mode: OSModeToFuseMode(fi.Mode()),
			})
		}
		status = fuse.OK
	}
	return c, status
}