mount

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	F_OFD_GETLK  = 36
	F_OFD_SETLK  = 37
	F_OFD_SETLKW = 38

	S_IRUGO   = syscall.S_IRGRP | syscall.S_IRUSR | syscall.S_IROTH
	S_IWUGO   = syscall.S_IWGRP | syscall.S_IWUSR | syscall.S_IWOTH
	S_IXUGO   = syscall.S_IXGRP | syscall.S_IXUSR | syscall.S_IXOTH
	S_IRWXUGO = syscall.S_IRWXU | syscall.S_IRWXG | syscall.S_IRWXO
	F_DIR_RW  = syscall.S_IFDIR | 0777
	F_FILE_RW = syscall.S_IFREG | 0644
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DirEntry

type DirEntry struct {
	fs.Inode
	// contains filtered or unexported fields
}

func NewDirEntry

func NewDirEntry(ctx context.Context, entry *oss.DirEntry, ossFS *oss.FS, db storage.Storage, mnt string) (*DirEntry, error)

func (*DirEntry) Access

func (d *DirEntry) Access(ctx context.Context, input uint32) (errno syscall.Errno)

func (*DirEntry) Create

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

func (*DirEntry) DB

func (d *DirEntry) DB() storage.Storage

func (*DirEntry) FileInfo

func (d *DirEntry) FileInfo() (*oss.FileInfo, error)

func (*DirEntry) Flush

func (d *DirEntry) Flush(ctx context.Context, fh fs.FileHandle) syscall.Errno

func (*DirEntry) Getattr

func (d *DirEntry) Getattr(ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno

func (*DirEntry) IsDir

func (d *DirEntry) IsDir() bool

func (*DirEntry) Lookup

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

func (*DirEntry) Mkdir

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

func (*DirEntry) Mountpoint

func (d *DirEntry) Mountpoint() string

func (*DirEntry) Open

func (d *DirEntry) Open(ctx context.Context, flags uint32) (fs.FileHandle, uint32, syscall.Errno)

func (*DirEntry) OssFS

func (d *DirEntry) OssFS() *oss.FS

func (*DirEntry) Path

func (d *DirEntry) Path() string

func (*DirEntry) Read

func (d *DirEntry) Read(ctx context.Context, fh fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)

func (*DirEntry) RelPath

func (d *DirEntry) RelPath() string

func (*DirEntry) Rename

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

func (*DirEntry) Rmdir

func (d *DirEntry) Rmdir(ctx context.Context, name string) syscall.Errno

func (*DirEntry) Setattr

func (d *DirEntry) Setattr(ctx context.Context, fh fs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
func (d *DirEntry) Unlink(ctx context.Context, name string) syscall.Errno

func (*DirEntry) UpdateModified

func (d *DirEntry) UpdateModified(ctx context.Context) error

func (*DirEntry) Write

func (d *DirEntry) Write(ctx context.Context, fh fs.FileHandle, data []byte, off int64) (written uint32, errno syscall.Errno)

type FS

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

func NewFS

func NewFS(ctx context.Context, fs *oss.FS, mnt string, db storage.Storage) (*FS, error)

func (*FS) DB

func (f *FS) DB() storage.Storage

func (*FS) Iter

func (r *FS) Iter(ctx context.Context, reader *oss.ReadDirFile, p *fs.Inode)

func (*FS) Mountpoint

func (f *FS) Mountpoint() string

func (*FS) OnAdd

func (r *FS) OnAdd(ctx context.Context)

func (*FS) OssFS

func (f *FS) OssFS() *oss.FS

type File

type File struct {
	fs.Inode
	// contains filtered or unexported fields
}

func NewFile

func NewFile(ctx context.Context, finfo *oss.FileInfo, ossFS *oss.FS, db storage.Storage, mnt string) (*File, error)

func (*File) DB

func (f *File) DB() storage.Storage

func (*File) Flush

func (f *File) Flush(ctx context.Context, fh fs.FileHandle) syscall.Errno

func (*File) Getattr

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

func (*File) Info

func (f *File) Info() *oss.FileInfo

func (*File) Mountpoint

func (f *File) Mountpoint() string

func (*File) Open

func (f *File) Open(ctx context.Context, flags uint32) (fs.FileHandle, uint32, syscall.Errno)

func (*File) OssFS

func (f *File) OssFS() *oss.FS

func (*File) Path

func (f *File) Path() string

func (*File) Read

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

func (*File) RelPath

func (f *File) RelPath() string

func (*File) Setattr

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

func (*File) Write

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

type Mounter

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

func NewMounter

func NewMounter(ossFS *oss.FS, mountpoint string, name string, db storage.Storage) *Mounter

func (*Mounter) Mount

func (m *Mounter) Mount(ctx context.Context) error

func (*Mounter) Open

func (m *Mounter) Open() error

func (*Mounter) Unmount

func (m *Mounter) Unmount()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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