Run NodesReferenceutils

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() bool
func (m MockFile) Name() string
func (m MockFile) Type() fs.FileMode

MockReader

MockReader is a mock of Reader interface.

func NewMockReader(ctrl *gomock.Controller) *MockReader
func (m *MockReader) EXPECT() *MockReaderMockRecorder
func (m *MockReader) ReadDir(arg0 string) ([]fs.DirEntry, error)

MockReaderMockRecorder

MockReaderMockRecorder is the mock recorder for MockReader.

func (mr *MockReaderMockRecorder) ReadDir(arg0 any) *gomock.Call

Reader

Reader is an interface for reading the filesystem.

func NewReader() Reader