Documentation ¶
Index ¶
- type DefaultFS
- func (fs *DefaultFS) ChDir(dir string) error
- func (fs *DefaultFS) Mkdir(name string) error
- func (fs *DefaultFS) Open(name string) (File, error)
- func (fs *DefaultFS) ReadDir(name string) ([]os.DirEntry, error)
- func (fs *DefaultFS) ReadFile(name string) ([]byte, error)
- func (fs *DefaultFS) Remove(name string) error
- func (fs *DefaultFS) Stat(name string) (os.FileInfo, error)
- func (fs *DefaultFS) WriteFile(name string, data []byte) error
- type FS
- type File
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS interface { ChDir(dir string) error Mkdir(name string) error // Remove removes the named file or directory and any children // it contains. It removes evertyhing it can but returns the // first error it encounters. If the path does not exist, Remove // returns nil (no error). Remove(name string) error // Open opens the named file for reading and writing, If the // file does not exist, it creates an empty file. Open(name string) (File, error) Stat(name string) (os.FileInfo, error) ReadDir(name string) ([]os.DirEntry, error) ReadFile(name string) ([]byte, error) WriteFile(name string, data []byte) error }
Click to show internal directories.
Click to hide internal directories.