Documentation ¶
Overview ¶
Package filesystem is a generated GoMock package.
Index ¶
- type FileSystem
- type MockDirEntry
- type MockFileInfo
- type MockFileSystem
- func (m *MockFileSystem) EXPECT() *MockFileSystemMockRecorder
- func (m *MockFileSystem) Getwd() (string, error)
- func (m *MockFileSystem) OpenFile(arg0 string, arg1 int, arg2 fs.FileMode) (*os.File, error)
- func (m *MockFileSystem) OpenFileBuffered(arg0 string) (*bufio.Reader, error)
- func (m *MockFileSystem) OpenFileRO(arg0 string) (*os.File, error)
- func (m *MockFileSystem) ReadDir(arg0 string) ([]fs.DirEntry, error)
- func (m *MockFileSystem) ReadFile(arg0 string) ([]byte, error)
- func (m *MockFileSystem) Stat(arg0 string) (fs.FileInfo, error)
- func (m *MockFileSystem) Walk(arg0 string, arg1 filepath.WalkFunc) error
- type MockFileSystemMockRecorder
- func (mr *MockFileSystemMockRecorder) Getwd() *gomock.Call
- func (mr *MockFileSystemMockRecorder) OpenFile(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockFileSystemMockRecorder) OpenFileBuffered(arg0 interface{}) *gomock.Call
- func (mr *MockFileSystemMockRecorder) OpenFileRO(arg0 interface{}) *gomock.Call
- func (mr *MockFileSystemMockRecorder) ReadDir(arg0 interface{}) *gomock.Call
- func (mr *MockFileSystemMockRecorder) ReadFile(arg0 interface{}) *gomock.Call
- func (mr *MockFileSystemMockRecorder) Stat(arg0 interface{}) *gomock.Call
- func (mr *MockFileSystemMockRecorder) Walk(arg0, arg1 interface{}) *gomock.Call
- type OSFileSystem
- func (s *OSFileSystem) Getwd() (string, error)
- func (s *OSFileSystem) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (s *OSFileSystem) OpenFileBuffered(name string) (*bufio.Reader, error)
- func (s *OSFileSystem) OpenFileRO(name string) (*os.File, error)
- func (s *OSFileSystem) ReadDir(dirname string) ([]os.DirEntry, error)
- func (s *OSFileSystem) ReadFile(filename string) ([]byte, error)
- func (s *OSFileSystem) Stat(name string) (os.FileInfo, error)
- func (s *OSFileSystem) Walk(root string, walkFn filepath.WalkFunc) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶
type FileSystem interface { Stat(name string) (os.FileInfo, error) Walk(root string, walkFn filepath.WalkFunc) error OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) OpenFileRO(name string) (*os.File, error) OpenFileBuffered(name string) (*bufio.Reader, error) ReadDir(dirname string) ([]os.DirEntry, error) ReadFile(filename string) ([]byte, error) Getwd() (string, error) }
type MockDirEntry ¶ added in v1.16.11
MockDirEntry implements os.DirEntry interface for mocking in tests.
func (*MockDirEntry) Info ¶ added in v1.16.11
func (m *MockDirEntry) Info() (os.FileInfo, error)
Info returns the mocked file info.
func (*MockDirEntry) IsDir ¶ added in v1.16.11
func (m *MockDirEntry) IsDir() bool
IsDir returns the mocked directory flag.
func (*MockDirEntry) Name ¶ added in v1.16.11
func (m *MockDirEntry) Name() string
Name returns the mocked name of the directory entry.
func (*MockDirEntry) Type ¶ added in v1.16.11
func (m *MockDirEntry) Type() os.FileMode
Type returns the mocked file mode.
type MockFileInfo ¶
type MockFileInfo struct { FName string FSize int64 FMode os.FileMode FModTime time.Time FIsDir bool }
func (*MockFileInfo) IsDir ¶
func (m *MockFileInfo) IsDir() bool
func (*MockFileInfo) ModTime ¶
func (m *MockFileInfo) ModTime() time.Time
func (*MockFileInfo) Mode ¶
func (m *MockFileInfo) Mode() os.FileMode
func (*MockFileInfo) Name ¶
func (m *MockFileInfo) Name() string
func (*MockFileInfo) Size ¶
func (m *MockFileInfo) Size() int64
func (*MockFileInfo) Sys ¶
func (m *MockFileInfo) Sys() interface{}
type MockFileSystem ¶
type MockFileSystem struct {
// contains filtered or unexported fields
}
MockFileSystem is a mock of FileSystem interface.
func NewMockFileSystem ¶
func NewMockFileSystem(ctrl *gomock.Controller) *MockFileSystem
NewMockFileSystem creates a new mock instance.
func (*MockFileSystem) EXPECT ¶
func (m *MockFileSystem) EXPECT() *MockFileSystemMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFileSystem) Getwd ¶ added in v1.16.11
func (m *MockFileSystem) Getwd() (string, error)
Getwd mocks base method.
func (*MockFileSystem) OpenFileBuffered ¶
func (m *MockFileSystem) OpenFileBuffered(arg0 string) (*bufio.Reader, error)
OpenFileBuffered mocks base method.
func (*MockFileSystem) OpenFileRO ¶
func (m *MockFileSystem) OpenFileRO(arg0 string) (*os.File, error)
OpenFileRO mocks base method.
func (*MockFileSystem) ReadDir ¶ added in v1.16.11
func (m *MockFileSystem) ReadDir(arg0 string) ([]fs.DirEntry, error)
ReadDir mocks base method.
func (*MockFileSystem) ReadFile ¶ added in v1.16.11
func (m *MockFileSystem) ReadFile(arg0 string) ([]byte, error)
ReadFile mocks base method.
type MockFileSystemMockRecorder ¶
type MockFileSystemMockRecorder struct {
// contains filtered or unexported fields
}
MockFileSystemMockRecorder is the mock recorder for MockFileSystem.
func (*MockFileSystemMockRecorder) Getwd ¶ added in v1.16.11
func (mr *MockFileSystemMockRecorder) Getwd() *gomock.Call
Getwd indicates an expected call of Getwd.
func (*MockFileSystemMockRecorder) OpenFile ¶
func (mr *MockFileSystemMockRecorder) OpenFile(arg0, arg1, arg2 interface{}) *gomock.Call
OpenFile indicates an expected call of OpenFile.
func (*MockFileSystemMockRecorder) OpenFileBuffered ¶
func (mr *MockFileSystemMockRecorder) OpenFileBuffered(arg0 interface{}) *gomock.Call
OpenFileBuffered indicates an expected call of OpenFileBuffered.
func (*MockFileSystemMockRecorder) OpenFileRO ¶
func (mr *MockFileSystemMockRecorder) OpenFileRO(arg0 interface{}) *gomock.Call
OpenFileRO indicates an expected call of OpenFileRO.
func (*MockFileSystemMockRecorder) ReadDir ¶ added in v1.16.11
func (mr *MockFileSystemMockRecorder) ReadDir(arg0 interface{}) *gomock.Call
ReadDir indicates an expected call of ReadDir.
func (*MockFileSystemMockRecorder) ReadFile ¶ added in v1.16.11
func (mr *MockFileSystemMockRecorder) ReadFile(arg0 interface{}) *gomock.Call
ReadFile indicates an expected call of ReadFile.
func (*MockFileSystemMockRecorder) Stat ¶
func (mr *MockFileSystemMockRecorder) Stat(arg0 interface{}) *gomock.Call
Stat indicates an expected call of Stat.
func (*MockFileSystemMockRecorder) Walk ¶
func (mr *MockFileSystemMockRecorder) Walk(arg0, arg1 interface{}) *gomock.Call
Walk indicates an expected call of Walk.
type OSFileSystem ¶
type OSFileSystem struct{}
func NewOSFileSystem ¶
func NewOSFileSystem() *OSFileSystem
func (*OSFileSystem) Getwd ¶ added in v1.16.11
func (s *OSFileSystem) Getwd() (string, error)
func (*OSFileSystem) OpenFileBuffered ¶
func (s *OSFileSystem) OpenFileBuffered(name string) (*bufio.Reader, error)
func (*OSFileSystem) OpenFileRO ¶
func (s *OSFileSystem) OpenFileRO(name string) (*os.File, error)
func (*OSFileSystem) ReadDir ¶ added in v1.16.11
func (s *OSFileSystem) ReadDir(dirname string) ([]os.DirEntry, error)