34 lines
584 B
Go
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
|
|
}
|