filesystem
Package filesystem is a generated GoMock package.
import "github.com/luxfi/node/utils/filesystem"Package filesystem is a generated GoMock package.
Functions
RenameIfExists
func RenameIfExists(a, b string) (renamed bool, err error)Renames the file "a" to "b" iff "a" exists. It returns "true" and no error, if rename were successful. It returns "false" and no error, if the file "a" does not exist. It returns "false" and an error, if rename failed.
Types
MockFile
MockFile is an implementation of fs.File for unit testing.
func (m MockFile) Info() (fs.FileInfo, error)func (m MockFile) IsDir() boolfunc (m MockFile) Name() stringfunc (m MockFile) Type() fs.FileModeMockReader
MockReader is a mock of Reader interface.
func NewMockReader(ctrl *gomock.Controller) *MockReaderfunc (m *MockReader) EXPECT() *MockReaderMockRecorderfunc (m *MockReader) ReadDir(arg0 string) ([]fs.DirEntry, error)MockReaderMockRecorder
MockReaderMockRecorder is the mock recorder for MockReader.
func (mr *MockReaderMockRecorder) ReadDir(arg0 any) *gomock.CallReader
Reader is an interface for reading the filesystem.
func NewReader() Reader