os

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package os is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockOSWrapper

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

MockOSWrapper is a mock of OSWrapper interface.

func NewMockOSWrapper

func NewMockOSWrapper(ctrl *gomock.Controller) *MockOSWrapper

NewMockOSWrapper creates a new mock instance.

func (*MockOSWrapper) EXPECT

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

func (*MockOSWrapper) Exists

func (m *MockOSWrapper) Exists(linkBehavior path.LinkTreatment, filename string) (bool, error)

Exists mocks base method.

func (*MockOSWrapper) IsNotExist

func (m *MockOSWrapper) IsNotExist(err error) bool

IsNotExist mocks base method.

func (*MockOSWrapper) MkdirAll

func (m *MockOSWrapper) MkdirAll(path string, perm os.FileMode) error

MkdirAll mocks base method.

func (*MockOSWrapper) Open

func (m *MockOSWrapper) Open(path string) (*os.File, error)

Open mocks base method.

func (*MockOSWrapper) RemoveAll

func (m *MockOSWrapper) RemoveAll(path string) error

RemoveAll mocks base method.

func (*MockOSWrapper) Stat

func (m *MockOSWrapper) Stat(name string) (os.FileInfo, error)

Stat mocks base method.

func (*MockOSWrapper) Statfs

func (m *MockOSWrapper) Statfs(path string, buf *unix.Statfs_t) error

Statfs mocks base method.

type MockOSWrapperMockRecorder

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

MockOSWrapperMockRecorder is the mock recorder for MockOSWrapper.

func (*MockOSWrapperMockRecorder) Exists

func (mr *MockOSWrapperMockRecorder) Exists(linkBehavior, filename any) *gomock.Call

Exists indicates an expected call of Exists.

func (*MockOSWrapperMockRecorder) IsNotExist

func (mr *MockOSWrapperMockRecorder) IsNotExist(err any) *gomock.Call

IsNotExist indicates an expected call of IsNotExist.

func (*MockOSWrapperMockRecorder) MkdirAll

func (mr *MockOSWrapperMockRecorder) MkdirAll(path, perm any) *gomock.Call

MkdirAll indicates an expected call of MkdirAll.

func (*MockOSWrapperMockRecorder) Open

func (mr *MockOSWrapperMockRecorder) Open(path any) *gomock.Call

Open indicates an expected call of Open.

func (*MockOSWrapperMockRecorder) RemoveAll

func (mr *MockOSWrapperMockRecorder) RemoveAll(path any) *gomock.Call

RemoveAll indicates an expected call of RemoveAll.

func (*MockOSWrapperMockRecorder) Stat

func (mr *MockOSWrapperMockRecorder) Stat(name any) *gomock.Call

Stat indicates an expected call of Stat.

func (*MockOSWrapperMockRecorder) Statfs

func (mr *MockOSWrapperMockRecorder) Statfs(path, buf any) *gomock.Call

Statfs indicates an expected call of Statfs.

type OSWrapper

type OSWrapper interface {
	MkdirAll(path string, perm os.FileMode) error
	RemoveAll(path string) error
	Stat(name string) (os.FileInfo, error)
	IsNotExist(err error) bool
	Open(path string) (*os.File, error)
	Statfs(path string, buf *unix.Statfs_t) (err error)
	Exists(linkBehavior utilpath.LinkTreatment, filename string) (bool, error)
}

OSWrapper is the interface having os package methods implemented by OsOps. Defined it explicitly so that it can be mocked.

type OsOps

type OsOps struct{}

func (OsOps) Exists

func (o OsOps) Exists(linkBehavior utilpath.LinkTreatment, filename string) (bool, error)

func (OsOps) IsNotExist

func (o OsOps) IsNotExist(err error) bool

func (OsOps) MkdirAll

func (o OsOps) MkdirAll(path string, perm os.FileMode) error

func (OsOps) Open

func (o OsOps) Open(path string) (*os.File, error)

func (OsOps) RemoveAll

func (o OsOps) RemoveAll(name string) error

func (OsOps) Stat

func (o OsOps) Stat(path string) (os.FileInfo, error)

func (OsOps) Statfs

func (o OsOps) Statfs(path string, buf *unix.Statfs_t) (err error)

Jump to

Keyboard shortcuts

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