mount

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Init

func Init(ms []configure.Mount)

Types

type FileInfo

type FileInfo struct {
	Name  string
	Mode  uint32
	Size  int64
	IsDir bool
}

type FileSystem

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

func Default

func Default() *FileSystem

func (*FileSystem) List

func (f *FileSystem) List() []Mount

func (*FileSystem) Names

func (f *FileSystem) Names() []string

func (*FileSystem) Push

func (f *FileSystem) Push(name, root string, read, write, shared bool)

func (*FileSystem) Root

func (f *FileSystem) Root(name string) *Mount

func (*FileSystem) Shareds

func (f *FileSystem) Shareds() []string

type Mount

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

func (*Mount) CheckName

func (m *Mount) CheckName(name string) error

func (*Mount) Chmod

func (m *Mount) Chmod(name string, perm os.FileMode) (e error)

func (*Mount) Create

func (m *Mount) Create(file bool, dir, name string, perm os.FileMode) (info os.FileInfo, e error)

func (*Mount) Filename

func (m *Mount) Filename(path string) (filename string, e error)

func (*Mount) LS

func (m *Mount) LS(path string) (dir string, modtime time.Time, results []FileInfo, e error)

func (*Mount) Mkdir

func (m *Mount) Mkdir(name string, perm os.FileMode) (e error)

func (*Mount) Name

func (m *Mount) Name() string

func (*Mount) Open

func (m *Mount) Open(name string) (*os.File, error)

func (*Mount) OpenFile

func (m *Mount) OpenFile(name string, flag int, perm os.FileMode) (f *os.File, e error)

func (*Mount) Read

func (m *Mount) Read() bool

func (*Mount) RemoveAll

func (m *Mount) RemoveAll(name string) (e error)

func (*Mount) RemoveAllItem

func (m *Mount) RemoveAllItem(dir string, names []string) (e error)

func (*Mount) Rename

func (m *Mount) Rename(dir, old, current string) (e error)

func (*Mount) Shared

func (m *Mount) Shared() bool

func (*Mount) Stat

func (m *Mount) Stat(name string) (info os.FileInfo, e error)

func (*Mount) SyncDir

func (m *Mount) SyncDir(name string, perm os.FileMode) (e error)

func (*Mount) Walk

func (m *Mount) Walk(root string, fn filepath.WalkFunc) error

func (*Mount) Write

func (m *Mount) Write() bool

Jump to

Keyboard shortcuts

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