Versions in this module Expand all Collapse all v2 v2.3.2 Feb 16, 2021 Changes in this version + func IsCloseFileError(e error) bool + func IsCreateDirectoryError(e error) bool + func IsCreateFileError(e error) bool + func IsFileExistsError(e error) bool + func IsOpenFileError(e error) bool + func IsReadFileError(e error) bool + func IsWriteFileError(e error) bool + type FileSystem interface + Create func(path string) (io.Writer, error) + Exists func(path string) (bool, error) + Open func(path string) (io.ReadCloser, error) + func New(options ...Options) FileSystem + func NewMock(options ...MockOptions) FileSystem + type MockOptions func(system *mockFileSystem) + func MockCloseFileError(err error) MockOptions + func MockCreateDirError(err error) MockOptions + func MockCreateFileError(err error) MockOptions + func MockExists(exists func(path string) bool) MockOptions + func MockExistsError(err error) MockOptions + func MockInput(input *bytes.Buffer) MockOptions + func MockOpenFileError(err error) MockOptions + func MockOutput(output *bytes.Buffer) MockOptions + func MockPath(path string) MockOptions + func MockReadFileError(err error) MockOptions + func MockWriteFileError(err error) MockOptions + type Options func(system *fileSystem) + func DirectoryPermissions(dirPerm os.FileMode) Options + func FilePermissions(filePerm os.FileMode) Options