Files
zurg/internal/zfs/fs.go
2023-11-06 01:22:56 +01:00

36 lines
661 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"
"github.com/debridmediamanager.com/zurg/pkg/chunk"
"go.uber.org/zap"
)
type FS struct {
uid uint32
gid uint32
umask os.FileMode
directIO bool
lock sync.RWMutex
c config.ConfigInterface
t *torrent.TorrentManager
log *zap.SugaredLogger
initTime time.Time
chunk *chunk.Manager
}
// Root returns the root path
func (f *FS) Root() (fs.Node, error) {
return Object{
fs: f,
objType: ROOT,
mtime: f.initTime,
}, nil
}