Versions in this module Expand all Collapse all v0 v0.4.0 Aug 24, 2022 Changes in this version + var NoMockFileInfo = MockFileInfo() + var NoMockFs = MockFs() + type FileInfo struct + func NewFileInfo(mocks ...func(i *FileInfo)) *FileInfo + func (f *FileInfo) IsDir() bool + func (f *FileInfo) ModTime() time.Time + func (f *FileInfo) Mode() os.FileMode + func (f *FileInfo) Name() string + func (f *FileInfo) Size() int64 + func (f *FileInfo) Sys() interface{} + type FileInfoMocker func(tb testing.TB) *FileInfo + func MockFileInfo(mocks ...func(i *FileInfo)) FileInfoMocker + type Fs struct + func NewFs(mocks ...func(fs *Fs)) *Fs + func (f *Fs) Chmod(name string, mode os.FileMode) error + func (f *Fs) Chown(name string, uid, gid int) error + func (f *Fs) Chtimes(name string, atime time.Time, mtime time.Time) error + func (f *Fs) Create(name string) (afero.File, error) + func (f *Fs) Mkdir(name string, perm os.FileMode) error + func (f *Fs) MkdirAll(path string, perm os.FileMode) error + func (f *Fs) Name() string + func (f *Fs) Open(name string) (afero.File, error) + func (f *Fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error) + func (f *Fs) Remove(name string) error + func (f *Fs) RemoveAll(path string) error + func (f *Fs) Rename(oldname, newname string) error + func (f *Fs) Stat(name string) (os.FileInfo, error) + type FsMocker func(tb testing.TB) *Fs + func MockFs(mocks ...func(fs *Fs)) FsMocker