Documentation ¶
Index ¶
- Variables
- type DirEntry
- type Memory
- func (m *Memory) AddFile(path string, mode fs.FileMode, data []byte) error
- func (fs *Memory) CountDirContents(name string) (int, error)
- func (m *Memory) MkdirAll(path string, perm fs.FileMode) error
- func (m *Memory) Open(name string) (fs.File, error)
- func (m *Memory) ReadDir(name string) ([]fs.DirEntry, error)
- func (m *Memory) ReadFile(name string) ([]byte, error)
- func (m *Memory) ReadLink(name string) (string, error)
- func (m *Memory) Stat(name string) (fs.FileInfo, error)
- func (m *Memory) Symlink(target string, path string, perm fs.FileMode) error
- func (fs *Memory) UserHomeDir() (string, error)
- func (fs *Memory) WorkDir() string
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotLink = errors.New("not a link") ErrIsDir = errors.New("is a directory") )
Functions ¶
This section is empty.
Types ¶
type DirEntry ¶
type DirEntry struct {
// contains filtered or unexported fields
}
func (*DirEntry) Info ¶
Info returns the FileInfo for the file or subdirectory described by the entry. The returned FileInfo may be from the time of the original directory read or from the time of the call to Info. If the file has been removed or renamed since the directory read, Info may return an error satisfying errors.Is(err, ErrNotExist). If the entry denotes a symbolic link, Info reports the information about the link itself, not the link's target.
type Memory ¶
type Memory struct { *paths.LocalFilePath // contains filtered or unexported fields }
Memory a very convenient filesystem based on memory files
func (*Memory) CountDirContents ¶
CountDirContents: returns the number of files/directories direnctly under a given directory
func (*Memory) ReadLink ¶
ReadLink returns the destination of the named symbolic link. If there is an error, it will be of type *os.PathError.
func (*Memory) UserHomeDir ¶
UserHomeDir returns the current user's home directory.