Versions in this module Expand all Collapse all v2 v2.1.1 Apr 23, 2021 Changes in this version + const RENAME_EXCHANGE + var ENOATTR = syscall.ENOATTR — darwin/amd64 + var ENOATTR = syscall.ENODATA — linux/amd64 + var OK = syscall.Errno(0) + func Mount(dir string, root InodeEmbedder, options *Options) (*fuse.Server, error) + func NewNodeFS(root InodeEmbedder, opts *Options) fuse.RawFileSystem + func ToErrno(err error) syscall.Errno + type DirStream interface + Close func() + HasNext func() bool + Next func() (fuse.DirEntry, syscall.Errno) + func NewListDirStream(list []fuse.DirEntry) DirStream + func NewLoopbackDirStream(name string) (DirStream, syscall.Errno) + func NewLoopbackDirStream(nm string) (DirStream, syscall.Errno) + type FileAllocater interface + Allocate func(ctx context.Context, off uint64, size uint64, mode uint32) syscall.Errno + type FileFlusher interface + Flush func(ctx context.Context) syscall.Errno + type FileFsyncer interface + Fsync func(ctx context.Context, flags uint32) syscall.Errno + type FileGetattrer interface + Getattr func(ctx context.Context, out *fuse.AttrOut) syscall.Errno + type FileGetlker interface + Getlk func(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32, ...) syscall.Errno + type FileHandle interface + func NewLoopbackFile(fd int) FileHandle + type FileLseeker interface + Lseek func(ctx context.Context, off uint64, whence uint32) (uint64, syscall.Errno) + type FileReader interface + Read func(ctx context.Context, dest []byte, off int64) (fuse.ReadResult, syscall.Errno) + type FileReleaser interface + Release func(ctx context.Context) syscall.Errno + type FileSetattrer interface + Setattr func(ctx context.Context, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno + type FileSetlker interface + Setlk func(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno + type FileSetlkwer interface + Setlkw func(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) syscall.Errno + type FileWriter interface + Write func(ctx context.Context, data []byte, off int64) (written uint32, errno syscall.Errno) + type Inode struct + func (n *Inode) AddChild(name string, ch *Inode, overwrite bool) (success bool) + func (n *Inode) Children() map[string]*Inode + func (n *Inode) EmbeddedInode() *Inode + func (n *Inode) ExchangeChild(oldName string, newParent *Inode, newName string) + func (n *Inode) ForgetPersistent() + func (n *Inode) Forgotten() bool + func (n *Inode) GetChild(name string) *Inode + func (n *Inode) IsDir() bool + func (n *Inode) IsRoot() bool + func (n *Inode) Mode() uint32 + func (n *Inode) MvChild(old string, newParent *Inode, newName string, overwrite bool) bool + func (n *Inode) NewInode(ctx context.Context, node InodeEmbedder, id StableAttr) *Inode + func (n *Inode) NewPersistentInode(ctx context.Context, node InodeEmbedder, id StableAttr) *Inode + func (n *Inode) NotifyContent(off, sz int64) syscall.Errno + func (n *Inode) NotifyDelete(name string, child *Inode) syscall.Errno + func (n *Inode) NotifyEntry(name string) syscall.Errno + func (n *Inode) Operations() InodeEmbedder + func (n *Inode) Parent() (string, *Inode) + func (n *Inode) Path(root *Inode) string + func (n *Inode) ReadCache(offset int64, dest []byte) (count int, errno syscall.Errno) + func (n *Inode) RmAllChildren() + func (n *Inode) RmChild(names ...string) (success, live bool) + func (n *Inode) Root() *Inode + func (n *Inode) StableAttr() StableAttr + func (n *Inode) String() string + func (n *Inode) WriteCache(offset int64, data []byte) syscall.Errno + type InodeEmbedder interface + EmbeddedInode func() *Inode + func NewLoopbackRoot(rootPath string) (InodeEmbedder, error) + type LoopbackNode struct + RootData *LoopbackRoot + func (n *LoopbackNode) CopyFileRange(ctx context.Context, fhIn FileHandle, offIn uint64, out *Inode, ...) (uint32, syscall.Errno) + func (n *LoopbackNode) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (inode *Inode, fh FileHandle, fuseFlags uint32, errno syscall.Errno) + func (n *LoopbackNode) Getattr(ctx context.Context, f FileHandle, out *fuse.AttrOut) syscall.Errno + func (n *LoopbackNode) Getxattr(ctx context.Context, attr string, dest []byte) (uint32, syscall.Errno) + func (n *LoopbackNode) Link(ctx context.Context, target InodeEmbedder, name string, out *fuse.EntryOut) (*Inode, syscall.Errno) + func (n *LoopbackNode) Listxattr(ctx context.Context, dest []byte) (uint32, syscall.Errno) + func (n *LoopbackNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*Inode, syscall.Errno) + func (n *LoopbackNode) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*Inode, syscall.Errno) + func (n *LoopbackNode) Mknod(ctx context.Context, name string, mode, rdev uint32, out *fuse.EntryOut) (*Inode, syscall.Errno) + func (n *LoopbackNode) Open(ctx context.Context, flags uint32) (fh FileHandle, fuseFlags uint32, errno syscall.Errno) + func (n *LoopbackNode) Opendir(ctx context.Context) syscall.Errno + func (n *LoopbackNode) Readdir(ctx context.Context) (DirStream, syscall.Errno) + func (n *LoopbackNode) Readlink(ctx context.Context) ([]byte, syscall.Errno) + func (n *LoopbackNode) Removexattr(ctx context.Context, attr string) syscall.Errno + func (n *LoopbackNode) Rename(ctx context.Context, name string, newParent InodeEmbedder, newName string, ...) syscall.Errno + func (n *LoopbackNode) Rmdir(ctx context.Context, name string) syscall.Errno + func (n *LoopbackNode) Setattr(ctx context.Context, f FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno + func (n *LoopbackNode) Setxattr(ctx context.Context, attr string, data []byte, flags uint32) syscall.Errno + func (n *LoopbackNode) Statfs(ctx context.Context, out *fuse.StatfsOut) syscall.Errno + func (n *LoopbackNode) Symlink(ctx context.Context, target, name string, out *fuse.EntryOut) (*Inode, syscall.Errno) + func (n *LoopbackNode) Unlink(ctx context.Context, name string) syscall.Errno + type LoopbackRoot struct + Dev uint64 + NewNode func(rootData *LoopbackRoot, parent *Inode, name string, st *syscall.Stat_t) InodeEmbedder + Path string + type MemRegularFile struct + Attr fuse.Attr + Data []byte + func (f *MemRegularFile) Flush(ctx context.Context, fh FileHandle) syscall.Errno + func (f *MemRegularFile) Getattr(ctx context.Context, fh FileHandle, out *fuse.AttrOut) syscall.Errno + func (f *MemRegularFile) Open(ctx context.Context, flags uint32) (fh FileHandle, fuseFlags uint32, errno syscall.Errno) + func (f *MemRegularFile) Read(ctx context.Context, fh FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno) + func (f *MemRegularFile) Setattr(ctx context.Context, fh FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno + func (f *MemRegularFile) Write(ctx context.Context, fh FileHandle, data []byte, off int64) (uint32, syscall.Errno) + type MemSymlink struct + Attr fuse.Attr + Data []byte + func (l *MemSymlink) Getattr(ctx context.Context, fh FileHandle, out *fuse.AttrOut) syscall.Errno + func (l *MemSymlink) Readlink(ctx context.Context) ([]byte, syscall.Errno) + type NodeAccesser interface + Access func(ctx context.Context, mask uint32) syscall.Errno + type NodeAllocater interface + Allocate func(ctx context.Context, f FileHandle, off uint64, size uint64, mode uint32) syscall.Errno + type NodeCopyFileRanger interface + CopyFileRange func(ctx context.Context, fhIn FileHandle, offIn uint64, out *Inode, ...) (uint32, syscall.Errno) + type NodeCreater interface + Create func(ctx context.Context, name string, flags uint32, mode uint32, ...) (node *Inode, fh FileHandle, fuseFlags uint32, errno syscall.Errno) + type NodeFlusher interface + Flush func(ctx context.Context, f FileHandle) syscall.Errno + type NodeFsyncer interface + Fsync func(ctx context.Context, f FileHandle, flags uint32) syscall.Errno + type NodeGetattrer interface + Getattr func(ctx context.Context, f FileHandle, out *fuse.AttrOut) syscall.Errno + type NodeGetlker interface + Getlk func(ctx context.Context, f FileHandle, owner uint64, lk *fuse.FileLock, ...) syscall.Errno + type NodeGetxattrer interface + Getxattr func(ctx context.Context, attr string, dest []byte) (uint32, syscall.Errno) + type NodeLinker interface + Link func(ctx context.Context, target InodeEmbedder, name string, out *fuse.EntryOut) (node *Inode, errno syscall.Errno) + type NodeListxattrer interface + Listxattr func(ctx context.Context, dest []byte) (uint32, syscall.Errno) + type NodeLookuper interface + Lookup func(ctx context.Context, name string, out *fuse.EntryOut) (*Inode, syscall.Errno) + type NodeLseeker interface + Lseek func(ctx context.Context, f FileHandle, Off uint64, whence uint32) (uint64, syscall.Errno) + type NodeMkdirer interface + Mkdir func(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*Inode, syscall.Errno) + type NodeMknoder interface + Mknod func(ctx context.Context, name string, mode uint32, dev uint32, out *fuse.EntryOut) (*Inode, syscall.Errno) + type NodeOnAdder interface + OnAdd func(ctx context.Context) + type NodeOpendirer interface + Opendir func(ctx context.Context) syscall.Errno + type NodeOpener interface + Open func(ctx context.Context, flags uint32) (fh FileHandle, fuseFlags uint32, errno syscall.Errno) + type NodeReaddirer interface + Readdir func(ctx context.Context) (DirStream, syscall.Errno) + type NodeReader interface + Read func(ctx context.Context, f FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno) + type NodeReadlinker interface + Readlink func(ctx context.Context) ([]byte, syscall.Errno) + type NodeReleaser interface + Release func(ctx context.Context, f FileHandle) syscall.Errno + type NodeRemovexattrer interface + Removexattr func(ctx context.Context, attr string) syscall.Errno + type NodeRenamer interface + Rename func(ctx context.Context, name string, newParent InodeEmbedder, newName string, ...) syscall.Errno + type NodeRmdirer interface + Rmdir func(ctx context.Context, name string) syscall.Errno + type NodeSetattrer interface + Setattr func(ctx context.Context, f FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno + type NodeSetlker interface + Setlk func(ctx context.Context, f FileHandle, owner uint64, lk *fuse.FileLock, ...) syscall.Errno + type NodeSetlkwer interface + Setlkw func(ctx context.Context, f FileHandle, owner uint64, lk *fuse.FileLock, ...) syscall.Errno + type NodeSetxattrer interface + Setxattr func(ctx context.Context, attr string, data []byte, flags uint32) syscall.Errno + type NodeStatfser interface + Statfs func(ctx context.Context, out *fuse.StatfsOut) syscall.Errno + type NodeSymlinker interface + Symlink func(ctx context.Context, target, name string, out *fuse.EntryOut) (node *Inode, errno syscall.Errno) + type NodeUnlinker interface + Unlink func(ctx context.Context, name string) syscall.Errno + type NodeWriter interface + Write func(ctx context.Context, f FileHandle, data []byte, off int64) (written uint32, errno syscall.Errno) + type Options struct + AttrTimeout *time.Duration + EntryTimeout *time.Duration + FirstAutomaticIno uint64 + GID uint32 + Logger *log.Logger + NegativeTimeout *time.Duration + NullPermissions bool + OnAdd func(ctx context.Context) + ServerCallbacks ServerCallbacks + UID uint32 + type ServerCallbacks interface + DeleteNotify func(parent uint64, child uint64, name string) fuse.Status + EntryNotify func(parent uint64, name string) fuse.Status + InodeNotify func(node uint64, off int64, length int64) fuse.Status + InodeNotifyStoreCache func(node uint64, offset int64, data []byte) fuse.Status + InodeRetrieveCache func(node uint64, offset int64, dest []byte) (n int, st fuse.Status) + type StableAttr struct + Gen uint64 + Ino uint64 + Mode uint32 + func (i *StableAttr) Reserved() bool