Documentation
¶
Index ¶
- Constants
- type Filesystem
- func (fs *Filesystem) CloseFile(inode int) error
- func (fs *Filesystem) CrashClone(partialDisk bool) *Filesystem
- func (fs *Filesystem) FlushEverything()
- func (fs *Filesystem) GetInodeInfo(inode int) InodeInfo
- func (fs *Filesystem) Getdirinode(dirInode int, path string) (int, error)
- func (fs *Filesystem) Getpath(dirInode int) (string, error)
- func (fs *Filesystem) IterCrashes() func() (*Filesystem, bool)
- func (fs *Filesystem) Mkdir(dirInode int, path string) error
- func (fs *Filesystem) Mmap(inode int, len int) *Mmap
- func (fs *Filesystem) Munmap(m *Mmap)
- func (fs *Filesystem) OpenFile(dirInode int, path string, flag int) (int, error)
- func (fs *Filesystem) Read(inode int, pos int64, buffer syscallabi.ByteSliceView) int
- func (fs *Filesystem) ReadDir(inode int) ([]ReadDirEntry, error)
- func (fs *Filesystem) Release()
- func (fs *Filesystem) Remove(dirInode int, path string, rmDir bool) error
- func (fs *Filesystem) Rename(fromInode int, fromPath string, toInode int, toPath string) error
- func (fs *Filesystem) Stat(dirInode int, path string) (StatResp, error)
- func (fs *Filesystem) Statfd(inode int) (StatResp, error)
- func (fs *Filesystem) Sync(inode int)
- func (fs *Filesystem) Truncate(inode, pos int)
- func (fs *Filesystem) Write(inode int, pos int64, buffer syscallabi.ByteSliceView) int
- type InodeInfo
- type Mmap
- type ReadDirEntry
- type StatResp
Constants ¶
View Source
const RootInode = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filesystem ¶
type Filesystem struct {
// contains filtered or unexported fields
}
func NewEmptyFilesystem ¶
func NewEmptyFilesystem() *Filesystem
func NewLinuxFilesystem ¶
func NewLinuxFilesystem() *Filesystem
func (*Filesystem) CloseFile ¶
func (fs *Filesystem) CloseFile(inode int) error
func (*Filesystem) CrashClone ¶
func (fs *Filesystem) CrashClone(partialDisk bool) *Filesystem
func (*Filesystem) FlushEverything ¶
func (fs *Filesystem) FlushEverything()
func (*Filesystem) GetInodeInfo ¶
func (fs *Filesystem) GetInodeInfo(inode int) InodeInfo
func (*Filesystem) Getdirinode ¶
func (fs *Filesystem) Getdirinode(dirInode int, path string) (int, error)
func (*Filesystem) IterCrashes ¶
func (fs *Filesystem) IterCrashes() func() (*Filesystem, bool)
func (*Filesystem) Mmap ¶
func (fs *Filesystem) Mmap(inode int, len int) *Mmap
Open a mmap for the given inode. Mmap starts at offset 0.
func (*Filesystem) Read ¶
func (fs *Filesystem) Read(inode int, pos int64, buffer syscallabi.ByteSliceView) int
func (*Filesystem) ReadDir ¶
func (fs *Filesystem) ReadDir(inode int) ([]ReadDirEntry, error)
func (*Filesystem) Release ¶
func (fs *Filesystem) Release()
func (*Filesystem) Remove ¶
func (fs *Filesystem) Remove(dirInode int, path string, rmDir bool) error
func (*Filesystem) Sync ¶
func (fs *Filesystem) Sync(inode int)
func (*Filesystem) Truncate ¶
func (fs *Filesystem) Truncate(inode, pos int)
func (*Filesystem) Write ¶
func (fs *Filesystem) Write(inode int, pos int64, buffer syscallabi.ByteSliceView) int
type Mmap ¶
type Mmap struct { Inode int Data syscallabi.ByteSliceView }
A Mmap tracks an open mmap for a given file. Mmaps are implemented by keeping a slice around with the contents of the file.
Only read-only mmaps are supported since we do not get notified on writes. That is enough to make go.etcd.io/bbolt work.
type ReadDirEntry ¶
Click to show internal directories.
Click to hide internal directories.