Documentation
¶
Index ¶
- Variables
- type DataNode
- func (d *DataNode) AddData(name string, content []byte)
- func (d *DataNode) CopyFile(sourcePath string, target string, perm os.FileMode) error
- func (d *DataNode) Exists(name string, opts ...ExistsOptions) (bool, error)
- func (d *DataNode) Open(name string) (fs.File, error)
- func (d *DataNode) ReadDir(name string) ([]fs.DirEntry, error)
- func (d *DataNode) Stat(name string) (fs.FileInfo, error)
- func (d *DataNode) ToTar() ([]byte, error)
- func (d *DataNode) Walk(root string, fn fs.WalkDirFunc, opts ...WalkOptions) error
- type ExistsOptions
- type WalkOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPassword = errors.New("invalid password") ErrPasswordRequired = errors.New("password required") )
Functions ¶
This section is empty.
Types ¶
type DataNode ¶
type DataNode struct {
// contains filtered or unexported fields
}
DataNode is an in-memory filesystem that is compatible with fs.FS.
func (*DataNode) Exists ¶
func (d *DataNode) Exists(name string, opts ...ExistsOptions) (bool, error)
Exists returns true if the file or directory exists.
func (*DataNode) Walk ¶
func (d *DataNode) Walk(root string, fn fs.WalkDirFunc, opts ...WalkOptions) error
Walk recursively descends the file tree rooted at root, calling fn for each file or directory.
type ExistsOptions ¶
ExistsOptions allows customizing the Exists check.
Click to show internal directories.
Click to hide internal directories.