fs

package
v0.6.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoErr = syscall.Errno(0)

	RenameNoreplace = 0x1
	RenameExchange  = 0x2
	RenameWhiteout  = 0x4
)
View Source
const (
	ENOAttr = syscall.ENODATA
)

Variables

View Source
var (
	MountDev uint64
)

Functions

func Error2FuseSysError

func Error2FuseSysError(operation string, err error) syscall.Errno

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func (*File) Flush

func (f *File) Flush(ctx context.Context) syscall.Errno

func (*File) Fsync

func (f *File) Fsync(ctx context.Context, flags uint32) syscall.Errno

func (*File) Getattr

func (f *File) Getattr(ctx context.Context, out *fuse.AttrOut) syscall.Errno

func (*File) Read

func (f *File) Read(ctx context.Context, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)

func (*File) Release

func (f *File) Release(ctx context.Context) syscall.Errno

func (*File) Write

func (f *File) Write(ctx context.Context, data []byte, off int64) (written uint32, errno syscall.Errno)

type NanaFS

type NanaFS struct {
	controller.Controller

	Path      string
	Display   string
	MountOpts []string
	// contains filtered or unexported fields
}

func NewNanaFsRoot

func NewNanaFsRoot(cfg config.FUSE, controller controller.Controller) (*NanaFS, error)

func (*NanaFS) GetEntry

func (n *NanaFS) GetEntry(ctx context.Context, id int64) (*types.Metadata, error)

func (*NanaFS) GetSourceEntry

func (n *NanaFS) GetSourceEntry(ctx context.Context, id int64) (*types.Metadata, error)

func (*NanaFS) SetDebug

func (n *NanaFS) SetDebug(debug bool)

func (*NanaFS) Start

func (n *NanaFS) Start(stopCh chan struct{}) error

type NanaNode

type NanaNode struct {
	fs.Inode
	R *NanaFS
	// contains filtered or unexported fields
}

func (*NanaNode) Access

func (n *NanaNode) Access(ctx context.Context, mask uint32) syscall.Errno

func (*NanaNode) Create

func (n *NanaNode) Create(ctx context.Context, name string, flags uint32, mode uint32, out *fuse.EntryOut) (*fs.Inode, fs.FileHandle, uint32, syscall.Errno)

func (*NanaNode) Getattr

func (n *NanaNode) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrOut) syscall.Errno

func (*NanaNode) Getxattr

func (n *NanaNode) Getxattr(ctx context.Context, attr string, dest []byte) (uint32, syscall.Errno)
func (n *NanaNode) Link(ctx context.Context, target fs.InodeEmbedder, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*NanaNode) Lookup

func (n *NanaNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*NanaNode) Mkdir

func (n *NanaNode) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*NanaNode) Mknod

func (n *NanaNode) Mknod(ctx context.Context, name string, mode uint32, dev uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*NanaNode) OnAdd

func (n *NanaNode) OnAdd(ctx context.Context)

func (*NanaNode) Open

func (n *NanaNode) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)

func (*NanaNode) Opendir

func (n *NanaNode) Opendir(ctx context.Context) syscall.Errno

func (*NanaNode) Readdir

func (n *NanaNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
func (n *NanaNode) Readlink(ctx context.Context) ([]byte, syscall.Errno)

func (*NanaNode) Release

func (n *NanaNode) Release(ctx context.Context, f fs.FileHandle) (err syscall.Errno)

func (*NanaNode) Removexattr

func (n *NanaNode) Removexattr(ctx context.Context, attr string) syscall.Errno

func (*NanaNode) Rename

func (n *NanaNode) Rename(ctx context.Context, name string, newParent fs.InodeEmbedder, newName string, flags uint32) syscall.Errno

func (*NanaNode) Rmdir

func (n *NanaNode) Rmdir(ctx context.Context, name string) syscall.Errno

func (*NanaNode) Setattr

func (n *NanaNode) Setattr(ctx context.Context, f fs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno

func (*NanaNode) Setxattr

func (n *NanaNode) Setxattr(ctx context.Context, attr string, data []byte, flags uint32) syscall.Errno

func (*NanaNode) Statfs

func (n *NanaNode) Statfs(ctx context.Context, out *fuse.StatfsOut) syscall.Errno
func (n *NanaNode) Symlink(ctx context.Context, target, name string, out *fuse.EntryOut) (node *fs.Inode, errno syscall.Errno)

TODO: improve symlink operation

func (n *NanaNode) Unlink(ctx context.Context, name string) syscall.Errno

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL