Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + const SeekEndStaticEntries + const SeekEndZero + type CachedMappable struct + func (i *CachedMappable) AddMapping(ctx context.Context, ms memmap.MappingSpace, ar hostarch.AddrRange, ...) error + func (i *CachedMappable) CopyMapping(ctx context.Context, ms memmap.MappingSpace, srcAR, dstAR hostarch.AddrRange, ...) error + func (i *CachedMappable) Init(hostFD int) + func (i *CachedMappable) InitFileMapperOnce() + func (i *CachedMappable) InvalidateRange(r memmap.MappableRange) + func (i *CachedMappable) InvalidateUnsavable(ctx context.Context) error + func (i *CachedMappable) RemoveMapping(ctx context.Context, ms memmap.MappingSpace, ar hostarch.AddrRange, ...) + func (i *CachedMappable) Translate(ctx context.Context, required, optional memmap.MappableRange, ...) ([]memmap.Translation, error) + type Dentry struct + func (d *Dentry) DecRef(ctx context.Context) + func (d *Dentry) FSLocalPath() string + func (d *Dentry) IncRef() + func (d *Dentry) Init(fs *Filesystem, inode Inode) + func (d *Dentry) InitRoot(fs *Filesystem, inode Inode) + func (d *Dentry) Inode() Inode + func (d *Dentry) InotifyWithParent(ctx context.Context, events, cookie uint32, et vfs.EventType) + func (d *Dentry) LeakMessage() string + func (d *Dentry) LogRefs() bool + func (d *Dentry) OnZeroWatches(context.Context) + func (d *Dentry) Parent() *Dentry + func (d *Dentry) RefType() string + func (d *Dentry) TryIncRef() bool + func (d *Dentry) VFSDentry() *vfs.Dentry + func (d *Dentry) WalkDentryTree(ctx context.Context, vfsObj *vfs.VirtualFilesystem, p fspath.Path) (*Dentry, error) + func (d *Dentry) Watches() *vfs.Watches + type DynamicBytesFD struct + func (fd *DynamicBytesFD) Init(m *vfs.Mount, d *Dentry, data vfs.DynamicBytesSource, locks *vfs.FileLocks, ...) error + func (fd *DynamicBytesFD) PRead(ctx context.Context, dst usermem.IOSequence, offset int64, ...) (int64, error) + func (fd *DynamicBytesFD) PWrite(ctx context.Context, src usermem.IOSequence, offset int64, ...) (int64, error) + func (fd *DynamicBytesFD) Read(ctx context.Context, dst usermem.IOSequence, opts vfs.ReadOptions) (int64, error) + func (fd *DynamicBytesFD) Release(context.Context) + func (fd *DynamicBytesFD) Seek(ctx context.Context, offset int64, whence int32) (int64, error) + func (fd *DynamicBytesFD) SetStat(context.Context, vfs.SetStatOptions) error + func (fd *DynamicBytesFD) Stat(ctx context.Context, opts vfs.StatOptions) (linux.Statx, error) + func (fd *DynamicBytesFD) Write(ctx context.Context, src usermem.IOSequence, opts vfs.WriteOptions) (int64, error) + type DynamicBytesFile struct + func (*DynamicBytesFile) SetStat(context.Context, *vfs.Filesystem, *auth.Credentials, vfs.SetStatOptions) error + func (f *DynamicBytesFile) Data() vfs.DynamicBytesSource + func (f *DynamicBytesFile) Init(ctx context.Context, creds *auth.Credentials, devMajor, devMinor uint32, ...) + func (f *DynamicBytesFile) Locks() *vfs.FileLocks + func (f *DynamicBytesFile) Open(ctx context.Context, rp *vfs.ResolvingPath, d *Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error) + type Filesystem struct + MaxCachedDentries uint64 + func (fs *Filesystem) AccessAt(ctx context.Context, rp *vfs.ResolvingPath, creds *auth.Credentials, ...) error + func (fs *Filesystem) BoundEndpointAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.BoundEndpointOptions) (transport.BoundEndpoint, error) + func (fs *Filesystem) GetDentryAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.GetDentryOptions) (*vfs.Dentry, error) + func (fs *Filesystem) GetParentDentryAt(ctx context.Context, rp *vfs.ResolvingPath) (*vfs.Dentry, error) + func (fs *Filesystem) GetXattrAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.GetXattrOptions) (string, error) + func (fs *Filesystem) IsDescendant(vfsroot, vd vfs.VirtualDentry) bool + func (fs *Filesystem) LinkAt(ctx context.Context, rp *vfs.ResolvingPath, vd vfs.VirtualDentry) error + func (fs *Filesystem) ListXattrAt(ctx context.Context, rp *vfs.ResolvingPath, size uint64) ([]string, error) + func (fs *Filesystem) MkdirAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.MkdirOptions) error + func (fs *Filesystem) MknodAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.MknodOptions) error + func (fs *Filesystem) NextIno() uint64 + func (fs *Filesystem) OpenAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.OpenOptions) (*vfs.FileDescription, error) + func (fs *Filesystem) PrependPath(ctx context.Context, vfsroot, vd vfs.VirtualDentry, b *fspath.Builder) error + func (fs *Filesystem) ReadlinkAt(ctx context.Context, rp *vfs.ResolvingPath) (string, error) + func (fs *Filesystem) Release(ctx context.Context) + func (fs *Filesystem) RemoveXattrAt(ctx context.Context, rp *vfs.ResolvingPath, name string) error + func (fs *Filesystem) RenameAt(ctx context.Context, rp *vfs.ResolvingPath, oldParentVD vfs.VirtualDentry, ...) error + func (fs *Filesystem) RmdirAt(ctx context.Context, rp *vfs.ResolvingPath) error + func (fs *Filesystem) SafeDecRef(ctx context.Context, vd vfs.VirtualDentry) + func (fs *Filesystem) SafeDecRefFD(ctx context.Context, fd *vfs.FileDescription) + func (fs *Filesystem) SetStatAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.SetStatOptions) error + func (fs *Filesystem) SetXattrAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.SetXattrOptions) error + func (fs *Filesystem) StatAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.StatOptions) (linux.Statx, error) + func (fs *Filesystem) StatFSAt(ctx context.Context, rp *vfs.ResolvingPath) (linux.Statfs, error) + func (fs *Filesystem) SymlinkAt(ctx context.Context, rp *vfs.ResolvingPath, target string) error + func (fs *Filesystem) Sync(ctx context.Context) error + func (fs *Filesystem) UnlinkAt(ctx context.Context, rp *vfs.ResolvingPath) error + func (fs *Filesystem) VFSFilesystem() *vfs.Filesystem + type GenericDirectoryFD struct + func NewGenericDirectoryFD(m *vfs.Mount, d *Dentry, children *OrderedChildren, locks *vfs.FileLocks, ...) (*GenericDirectoryFD, error) + func (fd *GenericDirectoryFD) Allocate(ctx context.Context, mode, offset, length uint64) error + func (fd *GenericDirectoryFD) ConfigureMMap(ctx context.Context, opts *memmap.MMapOpts) error + func (fd *GenericDirectoryFD) Init(children *OrderedChildren, locks *vfs.FileLocks, opts *vfs.OpenOptions, ...) error + func (fd *GenericDirectoryFD) IterDirents(ctx context.Context, cb vfs.IterDirentsCallback) error + func (fd *GenericDirectoryFD) PRead(ctx context.Context, dst usermem.IOSequence, offset int64, ...) (int64, error) + func (fd *GenericDirectoryFD) PWrite(ctx context.Context, src usermem.IOSequence, offset int64, ...) (int64, error) + func (fd *GenericDirectoryFD) Read(ctx context.Context, dst usermem.IOSequence, opts vfs.ReadOptions) (int64, error) + func (fd *GenericDirectoryFD) Release(context.Context) + func (fd *GenericDirectoryFD) Seek(ctx context.Context, offset int64, whence int32) (int64, error) + func (fd *GenericDirectoryFD) SetStat(ctx context.Context, opts vfs.SetStatOptions) error + func (fd *GenericDirectoryFD) Stat(ctx context.Context, opts vfs.StatOptions) (linux.Statx, error) + func (fd *GenericDirectoryFD) VFSFileDescription() *vfs.FileDescription + func (fd *GenericDirectoryFD) Write(ctx context.Context, src usermem.IOSequence, opts vfs.WriteOptions) (int64, error) + type GenericDirectoryFDOptions struct + SeekEnd SeekEndConfig + type Inode interface + Anonymous func() bool + Keep func() bool + Open func(ctx context.Context, rp *vfs.ResolvingPath, d *Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error) + StatFS func(ctx context.Context, fs *vfs.Filesystem) (linux.Statfs, error) + Valid func(ctx context.Context) bool + Watches func() *vfs.Watches + func NewStaticDir(ctx context.Context, creds *auth.Credentials, devMajor, devMinor uint32, ...) Inode + func NewStaticSymlink(ctx context.Context, creds *auth.Credentials, devMajor, devMinor uint32, ...) Inode + type InodeAlwaysValid struct + func (*InodeAlwaysValid) Valid(context.Context) bool + type InodeAnonymous struct + func (*InodeAnonymous) Anonymous() bool + type InodeAttrs struct + func (a *InodeAttrs) CheckPermissions(_ context.Context, creds *auth.Credentials, ats vfs.AccessTypes) error + func (a *InodeAttrs) DecLinks() + func (a *InodeAttrs) DevMajor() uint32 + func (a *InodeAttrs) DevMinor() uint32 + func (a *InodeAttrs) GID() auth.KGID + func (a *InodeAttrs) IncLinks(n uint32) + func (a *InodeAttrs) Init(ctx context.Context, creds *auth.Credentials, devMajor, devMinor uint32, ...) + func (a *InodeAttrs) InitWithIDs(ctx context.Context, uid auth.KUID, gid auth.KGID, devMajor, devMinor uint32, ...) + func (a *InodeAttrs) Ino() uint64 + func (a *InodeAttrs) Links() uint32 + func (a *InodeAttrs) Mode() linux.FileMode + func (a *InodeAttrs) SetStat(ctx context.Context, fs *vfs.Filesystem, creds *auth.Credentials, ...) error + func (a *InodeAttrs) Stat(context.Context, *vfs.Filesystem, vfs.StatOptions) (linux.Statx, error) + func (a *InodeAttrs) TouchAtime(ctx context.Context, mnt *vfs.Mount) + func (a *InodeAttrs) TouchCMtime(ctx context.Context) + func (a *InodeAttrs) UID() auth.KUID + type InodeDirectoryNoNewChildren struct + func (InodeDirectoryNoNewChildren) NewDir(context.Context, string, vfs.MkdirOptions) (Inode, error) + func (InodeDirectoryNoNewChildren) NewFile(context.Context, string, vfs.OpenOptions) (Inode, error) + func (InodeDirectoryNoNewChildren) NewLink(context.Context, string, Inode) (Inode, error) + func (InodeDirectoryNoNewChildren) NewNode(context.Context, string, vfs.MknodOptions) (Inode, error) + func (InodeDirectoryNoNewChildren) NewSymlink(context.Context, string, string) (Inode, error) + type InodeNoStatFS struct + func (*InodeNoStatFS) StatFS(context.Context, *vfs.Filesystem) (linux.Statfs, error) + type InodeNoopRefCount struct + func (InodeNoopRefCount) DecRef(context.Context) + func (InodeNoopRefCount) IncRef() + func (InodeNoopRefCount) TryIncRef() bool + type InodeNotAnonymous struct + func (*InodeNotAnonymous) Anonymous() bool + type InodeNotDirectory struct + func (InodeNotDirectory) HasChildren() bool + func (InodeNotDirectory) IterDirents(ctx context.Context, mnt *vfs.Mount, callback vfs.IterDirentsCallback, ...) (newOffset int64, err error) + func (InodeNotDirectory) Lookup(ctx context.Context, name string) (Inode, error) + func (InodeNotDirectory) NewDir(context.Context, string, vfs.MkdirOptions) (Inode, error) + func (InodeNotDirectory) NewFile(context.Context, string, vfs.OpenOptions) (Inode, error) + func (InodeNotDirectory) NewLink(context.Context, string, Inode) (Inode, error) + func (InodeNotDirectory) NewNode(context.Context, string, vfs.MknodOptions) (Inode, error) + func (InodeNotDirectory) NewSymlink(context.Context, string, string) (Inode, error) + func (InodeNotDirectory) Rename(context.Context, string, string, Inode, Inode) error + func (InodeNotDirectory) RmDir(context.Context, string, Inode) error + func (InodeNotDirectory) Unlink(context.Context, string, Inode) error + type InodeNotSymlink struct + func (InodeNotSymlink) Getlink(context.Context, *vfs.Mount) (vfs.VirtualDentry, string, error) + func (InodeNotSymlink) Readlink(context.Context, *vfs.Mount) (string, error) + type InodeSymlink struct + func (InodeSymlink) Open(ctx context.Context, rp *vfs.ResolvingPath, d *Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error) + type InodeTemporary struct + func (*InodeTemporary) Keep() bool + type InodeWatches struct + func (i *InodeWatches) Watches() *vfs.Watches + type OrderedChildren struct + func (o *OrderedChildren) Destroy(ctx context.Context) + func (o *OrderedChildren) ForEachChild(fn func(string, Inode)) + func (o *OrderedChildren) HasChildren() bool + func (o *OrderedChildren) Init(opts OrderedChildrenOptions) + func (o *OrderedChildren) Insert(name string, child Inode) error + func (o *OrderedChildren) Inserter(name string, makeChild func() Inode) (Inode, error) + func (o *OrderedChildren) IterDirents(ctx context.Context, mnt *vfs.Mount, cb vfs.IterDirentsCallback, ...) (newOffset int64, err error) + func (o *OrderedChildren) Lookup(ctx context.Context, name string) (Inode, error) + func (o *OrderedChildren) Populate(children map[string]Inode) uint32 + func (o *OrderedChildren) Rename(ctx context.Context, oldname, newname string, child, dstDir Inode) error + func (o *OrderedChildren) RmDir(ctx context.Context, name string, child Inode) error + func (o *OrderedChildren) Unlink(ctx context.Context, name string, child Inode) error + type OrderedChildrenOptions struct + Writable bool + type SeekEndConfig int + type StaticDirectory struct + func (*StaticDirectory) SetStat(context.Context, *vfs.Filesystem, *auth.Credentials, vfs.SetStatOptions) error + func (s *StaticDirectory) DecRef(ctx context.Context) + func (s *StaticDirectory) Init(ctx context.Context, creds *auth.Credentials, devMajor, devMinor uint32, ...) + func (s *StaticDirectory) Open(ctx context.Context, rp *vfs.ResolvingPath, d *Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error) + type StaticSymlink struct + func (*StaticSymlink) SetStat(context.Context, *vfs.Filesystem, *auth.Credentials, vfs.SetStatOptions) error + func (s *StaticSymlink) Getlink(context.Context, *vfs.Mount) (vfs.VirtualDentry, string, error) + func (s *StaticSymlink) Init(ctx context.Context, creds *auth.Credentials, devMajor uint32, devMinor uint32, ...) + func (s *StaticSymlink) Readlink(_ context.Context, _ *vfs.Mount) (string, error)