vfs

package module
v0.0.0-...-6ce0a7f Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: ISC Imports: 9 Imported by: 0

README

vfs

vfs is a virtual in-memory filesystem. Unlike other similar implementations, it is not designed to expand beyond a simple filesystem abstraction that lives in memory.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

func NewVFS

func NewVFS() *FS

func (*FS) CreateMockFile

func (f *FS) CreateMockFile(fpath string, size int64, mode os.FileMode) error

func (*FS) LoadDirectory

func (f *FS) LoadDirectory(fsPath, sourcePath string) error

func (*FS) MkdirAll

func (f *FS) MkdirAll(path string, mode os.FileMode) error

func (*FS) Open

func (f *FS) Open(path string) (fs.File, error)

func (*FS) WriteFile

func (f *FS) WriteFile(path string, data []byte, mode os.FileMode) error

type File

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

func (*File) Close

func (f *File) Close() error

func (*File) Read

func (f *File) Read(data []byte) (int, error)

func (*File) Stat

func (f *File) Stat() (fs.FileInfo, error)

type MockFile

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

func (*MockFile) Close

func (f *MockFile) Close() error

func (*MockFile) Read

func (f *MockFile) Read(data []byte) (int, error)

func (*MockFile) Stat

func (f *MockFile) Stat() (fs.FileInfo, error)

Jump to

Keyboard shortcuts

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