Documentation ¶
Index ¶
- type FS
- func (fsys *FS) Glob(pattern string) ([]string, error)
- func (fsys *FS) MkDir(name string, perm fs.FileMode) error
- func (fsys *FS) Open(name string) (fs.File, error)
- func (fsys *FS) OpenFile(name string, flag int, perm fs.FileMode) (writefs.FileWriter, error)
- func (fsys *FS) ReadDir(name string) ([]fs.DirEntry, error)
- func (fsys *FS) ReadFile(name string) ([]byte, error)
- func (fsys *FS) Remove(name string) error
- func (fsys *FS) Stat(name string) (fs.FileInfo, error)
- func (fsys *FS) Sub(dir string) (fs.FS, error)
- type FileWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
FS mocks
type FileWriter ¶
FileWriter provides a struct based on testify/mock.Mock that implements the fs.Writer.
The struct is used to test the writefs package itself, and could be generally used to test methods that expects a writefs.WriteFS instance, by providing a mocked FileWriter type that you can return from you mocked writefs.WriteFS objects.
Click to show internal directories.
Click to hide internal directories.