Files
zurg/internal/zfs/fs.go
Ben Sarmiento 0c2cff2387 Zfs fixes
2023-11-12 02:05:45 +01:00

34 lines
584 B
Go

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 {
uid uint32
gid uint32
umask os.FileMode
directIO bool
lock sync.RWMutex
config config.ConfigInterface
tMgr *torrent.TorrentManager
log *zap.SugaredLogger
initTime time.Time
}
// Root returns the root path
func (f *FS) Root() (fs.Node, error) {
return Object{
fs: f,
objType: ROOT,
mtime: f.initTime,
}, nil
}