mount

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 19 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, mnt string) *DirEntry

func NewFile

func NewFile(ctx context.Context, fi *oss.FileInfo, ossFS *oss.FS, mnt string) *DirEntry

func (*DirEntry) Access

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

func (*DirEntry) CopyFileRange added in v1.0.5

func (d *DirEntry) CopyFileRange(ctx context.Context, fhIn fs.FileHandle,
	offIn uint64, out *fs.Inode, fhOut fs.FileHandle, offOut uint64,
	len uint64, flags uint64,
) (uint32, 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) CreateTemp added in v1.0.5

func (d *DirEntry) CreateTemp() (*os.File, error)

func (*DirEntry) ETag added in v1.0.5

func (d *DirEntry) ETag() string

func (*DirEntry) FileInfo

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

func (*DirEntry) FileSize added in v1.0.5

func (d *DirEntry) FileSize() int64

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) Getxattr added in v1.0.5

func (d *DirEntry) Getxattr(ctx context.Context, name string, dist []byte) (uint32, syscall.Errno)

Getxattr 获取扩展属性

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) ModTime added in v1.0.5

func (d *DirEntry) ModTime() uint64

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)

Read supports random reading of data from the file. This gets called as many times as are needed to get through all the desired data len(buf) bytes at a time.

func (*DirEntry) Readdir added in v1.0.5

func (d *DirEntry) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)

func (*DirEntry) RelPath

func (d *DirEntry) RelPath() string

func (*DirEntry) Release added in v1.0.5

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

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) SetETag added in v1.0.5

func (d *DirEntry) SetETag(etag string)

func (*DirEntry) SetModTime added in v1.0.5

func (d *DirEntry) SetModTime(t time.Time)

func (*DirEntry) SetPath added in v1.0.5

func (d *DirEntry) SetPath(path string)

func (*DirEntry) SetSize added in v1.0.5

func (d *DirEntry) SetSize(size int64)

func (*DirEntry) Setattr

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

func (*DirEntry) Setxattr added in v1.0.5

func (d *DirEntry) Setxattr(ctx context.Context, name string, value []byte, flags uint32) syscall.Errno

Setxattr 设置扩展属性

func (*DirEntry) Truncate added in v1.0.5

func (d *DirEntry) Truncate(size uint64) fuse.Status
func (d *DirEntry) Unlink(ctx context.Context, name string) syscall.Errno

func (*DirEntry) Utimens added in v1.0.5

func (d *DirEntry) Utimens(atime *time.Time, mtime *time.Time) fuse.Status

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) *FS

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

func (*FS) Statfs added in v1.0.5

func (r *FS) Statfs(ctx context.Context, out *fuse.StatfsOut) syscall.Errno

Statfs returns a constant (faked) set of details describing a very large file system.

type Mounter

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

func NewMounter

func NewMounter(ossFS *oss.FS, mountpoint string, name string) *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()

Jump to

Keyboard shortcuts

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