fs

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS interface {
	GetDirs(path string) ([]string, error)
	ReadFile(path string) ([]byte, error)
	Walk(path string, cb func(path string, dir bool, err error) error) error
	CreateDir(path string) error
	CreateFile(path string, content string) error
	Exists(path string) (bool, error)
	DirExists(path string) (bool, error)
}

FS is filesystem wrapper interface

func New

func New() FS

New returns FS instance using the os package

type MockFS

type MockFS struct {
	// contains filtered or unexported fields
}

MockFS is a mock of FS interface

func NewMockFS

func NewMockFS(ctrl *gomock.Controller) *MockFS

NewMockFS creates a new mock instance

func (*MockFS) CreateDir

func (_m *MockFS) CreateDir(path string) error

CreateDir mocks base method

func (*MockFS) CreateFile

func (_m *MockFS) CreateFile(path string, content string) error

CreateFile mocks base method

func (*MockFS) DirExists

func (_m *MockFS) DirExists(path string) (bool, error)

DirExists mocks base method

func (*MockFS) EXPECT

func (_m *MockFS) EXPECT() *MockFSMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockFS) Exists

func (_m *MockFS) Exists(path string) (bool, error)

Exists mocks base method

func (*MockFS) GetDirs

func (_m *MockFS) GetDirs(path string) ([]string, error)

GetDirs mocks base method

func (*MockFS) ReadFile

func (_m *MockFS) ReadFile(path string) ([]byte, error)

ReadFile mocks base method

func (*MockFS) Walk

func (_m *MockFS) Walk(path string, cb func(string, bool, error) error) error

Walk mocks base method

type MockFSMockRecorder

type MockFSMockRecorder struct {
	// contains filtered or unexported fields
}

MockFSMockRecorder is the mock recorder for MockFS

func (*MockFSMockRecorder) CreateDir

func (_mr *MockFSMockRecorder) CreateDir(arg0 interface{}) *gomock.Call

CreateDir indicates an expected call of CreateDir

func (*MockFSMockRecorder) CreateFile

func (_mr *MockFSMockRecorder) CreateFile(arg0, arg1 interface{}) *gomock.Call

CreateFile indicates an expected call of CreateFile

func (*MockFSMockRecorder) DirExists

func (_mr *MockFSMockRecorder) DirExists(arg0 interface{}) *gomock.Call

DirExists indicates an expected call of DirExists

func (*MockFSMockRecorder) Exists

func (_mr *MockFSMockRecorder) Exists(arg0 interface{}) *gomock.Call

Exists indicates an expected call of Exists

func (*MockFSMockRecorder) GetDirs

func (_mr *MockFSMockRecorder) GetDirs(arg0 interface{}) *gomock.Call

GetDirs indicates an expected call of GetDirs

func (*MockFSMockRecorder) ReadFile

func (_mr *MockFSMockRecorder) ReadFile(arg0 interface{}) *gomock.Call

ReadFile indicates an expected call of ReadFile

func (*MockFSMockRecorder) Walk

func (_mr *MockFSMockRecorder) Walk(arg0, arg1 interface{}) *gomock.Call

Walk indicates an expected call of Walk

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL