Add fuse mount without read

This commit is contained in:
Ben Sarmiento
2023-11-05 21:25:50 +01:00
parent a9c71a3e93
commit 4bd672f301
6 changed files with 198 additions and 43 deletions

View File

@@ -3,8 +3,12 @@ package zfs
import (
"os"
"sync"
"time"
"bazil.org/fuse/fs"
"github.com/debridmediamanager.com/zurg/internal/config"
"github.com/debridmediamanager.com/zurg/internal/torrent"
"go.uber.org/zap"
)
type FS struct {
@@ -13,9 +17,17 @@ type FS struct {
umask os.FileMode
directIO bool
lock sync.RWMutex
c config.ConfigInterface
t *torrent.TorrentManager
log *zap.SugaredLogger
initTime time.Time
}
// Root returns the root path
func (f *FS) Root() (fs.Node, error) {
return nil, nil
return Object{
fs: f,
objType: ROOT,
mtime: f.initTime,
}, nil
}