Documentation ¶
Index ¶
- type MockFile
- func (m *MockFile) Close() error
- func (m *MockFile) IsDir() bool
- func (m *MockFile) ModTime() time.Time
- func (m *MockFile) Mode() os.FileMode
- func (m *MockFile) Name() string
- func (m *MockFile) Read(dst []byte) (int, error)
- func (m *MockFile) Seek(offset int64, whence int) (int64, error)
- func (m *MockFile) Size() int64
- func (m *MockFile) Sys() interface{}
- type MockReader
- func (m *MockReader) Lstat(path string) (os.FileInfo, error)
- func (m *MockReader) Open(filename string) (vfs.ReadSeekCloser, error)
- func (m *MockReader) ReadDir(path string) ([]os.FileInfo, error)
- func (m *MockReader) RootType(path string) vfs.RootType
- func (m *MockReader) Stat(path string) (os.FileInfo, error)
- func (m *MockReader) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockFile ¶
MockFile is the simple implementation of vfs.ReadSeekCloser
var NilFile *MockFile
NilFile is a nil mockfile for easy reference
func NewMockFile ¶
NewMockFile creates a new mock file for use with the mock file system
type MockReader ¶
MockReader is a mock implementation of the Opener interface, for testing purposes
func NewMockFileSystem ¶
func NewMockFileSystem(files ...MockFile) *MockReader
NewMockFileSystem creates a new mock Reader
func (*MockReader) Lstat ¶
func (m *MockReader) Lstat(path string) (os.FileInfo, error)
Lstat does stat stuff
func (*MockReader) Open ¶
func (m *MockReader) Open(filename string) (vfs.ReadSeekCloser, error)
Open returns a pre-set data/error pair
func (*MockReader) ReadDir ¶
func (m *MockReader) ReadDir(path string) ([]os.FileInfo, error)
ReadDir walks the directory
func (*MockReader) RootType ¶
func (m *MockReader) RootType(path string) vfs.RootType
RootType returns the Root Type
func (*MockReader) Stat ¶
func (m *MockReader) Stat(path string) (os.FileInfo, error)
Stat gets file stats
func (*MockReader) String ¶
func (m *MockReader) String() string
Click to show internal directories.
Click to hide internal directories.