vssfs

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

View Source
var CacheLimit = 131072

Functions

func NewVSSFS

func NewVSSFS(snapshot *snapshots.WinVSSSnapshot, baseDir string) billy.Filesystem

Types

type VSSFS

type VSSFS struct {
	billy.Filesystem

	PathToID *lru.Cache[string, uint64]
	IDToPath *lru.Cache[uint64, string]
	// contains filtered or unexported fields
}

VSSFS extends osfs while enforcing read-only operations

func (*VSSFS) Chmod

func (fs *VSSFS) Chmod(name string, mode os.FileMode) error

func (*VSSFS) Chown

func (fs *VSSFS) Chown(name string, uid, gid int) error

func (*VSSFS) Chtimes

func (fs *VSSFS) Chtimes(name string, atime time.Time, mtime time.Time) error

func (*VSSFS) Create

func (fs *VSSFS) Create(filename string) (billy.File, error)

Override write operations to return read-only errors

func (*VSSFS) Lchown

func (fs *VSSFS) Lchown(name string, uid, gid int) error

func (*VSSFS) Lstat

func (fs *VSSFS) Lstat(filename string) (os.FileInfo, error)

func (*VSSFS) MkdirAll

func (fs *VSSFS) MkdirAll(filename string, perm os.FileMode) error

func (*VSSFS) Open added in v0.9.0

func (fs *VSSFS) Open(filename string) (billy.File, error)

func (*VSSFS) OpenFile

func (fs *VSSFS) OpenFile(filename string, flag int, perm os.FileMode) (billy.File, error)

func (*VSSFS) ReadDir

func (fs *VSSFS) ReadDir(dirname string) ([]os.FileInfo, error)

func (*VSSFS) Remove

func (fs *VSSFS) Remove(filename string) error

func (*VSSFS) Rename

func (fs *VSSFS) Rename(oldpath, newpath string) error

func (*VSSFS) Stat

func (fs *VSSFS) Stat(filename string) (os.FileInfo, error)
func (fs *VSSFS) Symlink(target, link string) error

func (*VSSFS) TempFile

func (fs *VSSFS) TempFile(dir, prefix string) (billy.File, error)

type VSSFileInfo

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

func (*VSSFileInfo) IsDir added in v0.9.0

func (fi *VSSFileInfo) IsDir() bool

func (*VSSFileInfo) ModTime added in v0.9.0

func (fi *VSSFileInfo) ModTime() time.Time

func (*VSSFileInfo) Mode added in v0.9.0

func (fi *VSSFileInfo) Mode() fs.FileMode

func (*VSSFileInfo) Name added in v0.9.0

func (fi *VSSFileInfo) Name() string

func (*VSSFileInfo) Size added in v0.9.0

func (fi *VSSFileInfo) Size() int64

func (*VSSFileInfo) Sys

func (vi *VSSFileInfo) Sys() interface{}

type VSSIDHandler added in v0.9.0

type VSSIDHandler struct {
	nfs.Handler
	// contains filtered or unexported fields
}

VSSIDHandler uses VSSFS's PathToID and IDToPath for handle management.

func NewVSSIDHandler added in v0.9.0

func NewVSSIDHandler(vssFS *VSSFS, underlyingHandler nfs.Handler) *VSSIDHandler

NewVSSIDHandler initializes the handler with a reference to VSSFS.

func (*VSSIDHandler) FromHandle added in v0.9.0

func (h *VSSIDHandler) FromHandle(handle []byte) (billy.Filesystem, []string, error)

func (*VSSIDHandler) HandleLimit added in v0.9.0

func (h *VSSIDHandler) HandleLimit() int

HandleLimit returns the number of precomputed handles.

func (*VSSIDHandler) InvalidateHandle added in v0.9.0

func (h *VSSIDHandler) InvalidateHandle(fs billy.Filesystem, handle []byte) error

InvalidateHandle is a no-op as handles are immutable.

func (*VSSIDHandler) ToHandle added in v0.9.0

func (h *VSSIDHandler) ToHandle(f billy.Filesystem, path []string) []byte

Jump to

Keyboard shortcuts

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