Documentation ¶
Index ¶
- type File
- func (_m *File) Close() error
- func (_m *File) CopyToFile(file vfs.File) error
- func (_m *File) CopyToLocation(location vfs.Location) (vfs.File, error)
- func (_m *File) Delete(deleteOpts ...options.DeleteOption) error
- func (_m *File) Exists() (bool, error)
- func (_m *File) LastModified() (*time.Time, error)
- func (_m *File) Location() vfs.Location
- func (_m *File) MoveToFile(file vfs.File) error
- func (_m *File) MoveToLocation(location vfs.Location) (vfs.File, error)
- func (_m *File) Name() string
- func (_m *File) Path() string
- func (_m *File) Read(p []byte) (int, error)
- func (_m *File) Seek(offset int64, whence int) (int64, error)
- func (_m *File) Size() (uint64, error)
- func (_m *File) String() string
- func (_m *File) Touch() error
- func (_m *File) URI() string
- func (_m *File) Write(p []byte) (int, error)
- type FileSystem
- type Location
- func (_m *Location) ChangeDir(relLocPath string) error
- func (_m *Location) DeleteFile(relFilePath string, deleteOpts ...options.DeleteOption) error
- func (_m *Location) Exists() (bool, error)
- func (_m *Location) FileSystem() vfs.FileSystem
- func (_m *Location) List() ([]string, error)
- func (_m *Location) ListByPrefix(prefix string) ([]string, error)
- func (_m *Location) ListByRegex(regex *regexp.Regexp) ([]string, error)
- func (_m *Location) NewFile(relFilePath string) (vfs.File, error)
- func (_m *Location) NewLocation(relLocPath string) (vfs.Location, error)
- func (_m *Location) Path() string
- func (_m *Location) String() string
- func (_m *Location) URI() string
- func (_m *Location) Volume() string
- type NewFileT
- type NewLocationT
- type ReadWriteFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
File is an autogenerated mock type for the File type
func NewFile ¶ added in v6.4.0
NewFile creates a new instance of File. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*File) CopyToFile ¶
CopyToFile provides a mock function with given fields: file
func (*File) CopyToLocation ¶
CopyToLocation provides a mock function with given fields: location
func (*File) Delete ¶
func (_m *File) Delete(deleteOpts ...options.DeleteOption) error
Delete provides a mock function with given fields: deleteOpts
func (*File) LastModified ¶
LastModified provides a mock function with given fields:
func (*File) MoveToFile ¶
MoveToFile provides a mock function with given fields: file
func (*File) MoveToLocation ¶
MoveToLocation provides a mock function with given fields: location
type FileSystem ¶
FileSystem is an autogenerated mock type for the FileSystem type
func (*FileSystem) Name ¶
func (_m *FileSystem) Name() string
Name provides a mock function with given fields:
func (*FileSystem) NewFile ¶
NewFile provides a mock function with given fields: volume, absFilePath
func (*FileSystem) NewLocation ¶
NewLocation provides a mock function with given fields: volume, absLocPath
func (*FileSystem) Retry ¶
func (_m *FileSystem) Retry() vfs.Retry
Retry provides a mock function with given fields:
func (*FileSystem) Scheme ¶
func (_m *FileSystem) Scheme() string
Scheme provides a mock function with given fields:
type Location ¶
Location is an autogenerated mock type for the Location type
func NewLocation ¶ added in v6.4.0
func NewLocation(t NewLocationT) *Location
NewLocation creates a new instance of Location. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Location) DeleteFile ¶
func (_m *Location) DeleteFile(relFilePath string, deleteOpts ...options.DeleteOption) error
DeleteFile provides a mock function with given fields: relFilePath, deleteOpts
func (*Location) FileSystem ¶
func (_m *Location) FileSystem() vfs.FileSystem
FileSystem provides a mock function with given fields:
func (*Location) ListByPrefix ¶
ListByPrefix provides a mock function with given fields: prefix
func (*Location) ListByRegex ¶
ListByRegex provides a mock function with given fields: regex
func (*Location) NewLocation ¶
NewLocation provides a mock function with given fields: relLocPath
type NewLocationT ¶ added in v6.4.0
type ReadWriteFile ¶
type ReadWriteFile struct { File Reader io.Reader Writer io.Writer Buffer *bytes.Buffer ReaderContent string }
ReadWriteFile is a custom mock which allows the consumer to assign a custom reader and writer for easily mocking file contents.
func NewMockFromFilepath ¶
func NewMockFromFilepath(filePath string) *ReadWriteFile
NewMockFromFilepath creates a new ReadWriteFile instance that can read a file from the provided path.
func NewStringFile ¶
func NewStringFile(data, fileName string) *ReadWriteFile
NewStringFile creates a new ReadWriteFile instance that can be read from the provided string as it's contents.
func (*ReadWriteFile) Content ¶
func (f *ReadWriteFile) Content() string
Content returns the data held by the ReadWriteFile struct