Documentation ¶
Index ¶
- func New(base afero.Fs, cbs *MockCbs) afero.Fs
- type File
- func (f File) Close() error
- func (f File) Name() string
- func (f File) Read(p []byte) (n int, err error)
- func (f File) ReadAt(p []byte, off int64) (n int, err error)
- func (f File) Readdir(count int) ([]os.FileInfo, error)
- func (f File) Readdirnames(n int) ([]string, error)
- func (f File) Seek(offset int64, whence int) (int64, error)
- func (f File) Stat() (os.FileInfo, error)
- func (f File) Sync() error
- func (f File) Truncate(size int64) error
- func (f File) Write(p []byte) (n int, err error)
- func (f File) WriteAt(p []byte, off int64) (n int, err error)
- func (f File) WriteString(s string) (ret int, err error)
- type MockCbs
- type MockFs
- func (m MockFs) Chmod(name string, mode os.FileMode) error
- func (m MockFs) Chown(name string, uid, gid int) error
- func (m MockFs) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (m MockFs) Create(name string) (afero.File, error)
- func (m MockFs) GetBase() afero.Fs
- func (m MockFs) Mkdir(name string, perm os.FileMode) error
- func (m MockFs) MkdirAll(path string, perm os.FileMode) error
- func (m MockFs) Name() string
- func (m MockFs) Open(name string) (afero.File, error)
- func (m MockFs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)
- func (m MockFs) Remove(name string) error
- func (m MockFs) RemoveAll(name string) error
- func (m MockFs) Rename(oldname, newname string) error
- func (m MockFs) Stat(name string) (os.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockCbs ¶
type MockCbs struct { AfsMkdir func(mfs afero.Fs, name string, perm os.FileMode) error AfsMkdirAll func(mfs afero.Fs, path string, perm os.FileMode) error AfsCreate func(mfs afero.Fs, name string) (afero.File, error) AfsStat func(mfs afero.Fs, name string) (os.FileInfo, error) AfsOpen func(mfs afero.Fs, name string) (afero.File, error) AfsRemoveAll func(mfs afero.Fs, name string) error AfsChtimes func(mfs afero.Fs, name string, atime time.Time, mtime time.Time) error AfsRename func(mfs afero.Fs, oldname, newname string) error AfsOpenFile func(mfs afero.Fs, name string, flag int, perm os.FileMode) (afero.File, error) AfiWrite func(mfi afero.File, p []byte) (n int, err error) AfiReaddir func(mfi afero.File, count int) ([]os.FileInfo, error) AfiRead func(mfi afero.File, p []byte) (n int, err error) AfiClose func(mfi afero.File) error }
Click to show internal directories.
Click to hide internal directories.