Documentation
¶
Overview ¶
Code generated by counterfeiter. DO NOT EDIT.
Index ¶
- type Fake
- func (fake *Fake) Chmod(name string, mode os.FileMode) error
- func (fake *Fake) ChmodArgsForCall(i int) (string, os.FileMode)
- func (fake *Fake) ChmodCallCount() int
- func (fake *Fake) ChmodReturns(result1 error)
- func (fake *Fake) ChmodReturnsOnCall(i int, result1 error)
- func (fake *Fake) Create(name string) (*os.File, error)
- func (fake *Fake) CreateArgsForCall(i int) string
- func (fake *Fake) CreateCallCount() int
- func (fake *Fake) CreateReturns(result1 *os.File, result2 error)
- func (fake *Fake) CreateReturnsOnCall(i int, result1 *os.File, result2 error)
- func (fake *Fake) Exit(code int)
- func (fake *Fake) ExitArgsForCall(i int) int
- func (fake *Fake) ExitCallCount() int
- func (fake *Fake) FindProcess(pid int) (*os.Process, error)
- func (fake *Fake) FindProcessArgsForCall(i int) int
- func (fake *Fake) FindProcessCallCount() int
- func (fake *Fake) FindProcessReturns(result1 *os.Process, result2 error)
- func (fake *Fake) FindProcessReturnsOnCall(i int, result1 *os.Process, result2 error)
- func (fake *Fake) Getenv(key string) string
- func (fake *Fake) GetenvArgsForCall(i int) string
- func (fake *Fake) GetenvCallCount() int
- func (fake *Fake) GetenvReturns(result1 string)
- func (fake *Fake) GetenvReturnsOnCall(i int, result1 string)
- func (fake *Fake) Getpid() int
- func (fake *Fake) GetpidCallCount() int
- func (fake *Fake) GetpidReturns(result1 int)
- func (fake *Fake) GetpidReturnsOnCall(i int, result1 int)
- func (fake *Fake) Getwd() (string, error)
- func (fake *Fake) GetwdCallCount() int
- func (fake *Fake) GetwdReturns(result1 string, result2 error)
- func (fake *Fake) GetwdReturnsOnCall(i int, result1 string, result2 error)
- func (fake *Fake) Invocations() map[string][][]interface{}
- func (fake *Fake) MkdirAll(path string, perm os.FileMode) error
- func (fake *Fake) MkdirAllArgsForCall(i int) (string, os.FileMode)
- func (fake *Fake) MkdirAllCallCount() int
- func (fake *Fake) MkdirAllReturns(result1 error)
- func (fake *Fake) MkdirAllReturnsOnCall(i int, result1 error)
- func (fake *Fake) Open(name string) (*os.File, error)
- func (fake *Fake) OpenArgsForCall(i int) string
- func (fake *Fake) OpenCallCount() int
- func (fake *Fake) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (fake *Fake) OpenFileArgsForCall(i int) (string, int, os.FileMode)
- func (fake *Fake) OpenFileCallCount() int
- func (fake *Fake) OpenFileReturns(result1 *os.File, result2 error)
- func (fake *Fake) OpenFileReturnsOnCall(i int, result1 *os.File, result2 error)
- func (fake *Fake) OpenReturns(result1 *os.File, result2 error)
- func (fake *Fake) OpenReturnsOnCall(i int, result1 *os.File, result2 error)
- func (fake *Fake) RemoveAll(path string) error
- func (fake *Fake) RemoveAllArgsForCall(i int) string
- func (fake *Fake) RemoveAllCallCount() int
- func (fake *Fake) RemoveAllReturns(result1 error)
- func (fake *Fake) RemoveAllReturnsOnCall(i int, result1 error)
- func (fake *Fake) Setenv(key string, value string) error
- func (fake *Fake) SetenvArgsForCall(i int) (string, string)
- func (fake *Fake) SetenvCallCount() int
- func (fake *Fake) SetenvReturns(result1 error)
- func (fake *Fake) SetenvReturnsOnCall(i int, result1 error)
- func (fake *Fake) Stat(name string) (os.FileInfo, error)
- func (fake *Fake) StatArgsForCall(i int) string
- func (fake *Fake) StatCallCount() int
- func (fake *Fake) StatReturns(result1 os.FileInfo, result2 error)
- func (fake *Fake) StatReturnsOnCall(i int, result1 os.FileInfo, result2 error)
- type IOS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fake ¶
type Fake struct {
ChmodStub func(name string, mode os.FileMode) error
CreateStub func(name string) (*os.File, error)
ExitStub func(code int)
FindProcessStub func(pid int) (*os.Process, error)
GetenvStub func(key string) string
GetpidStub func() int
GetwdStub func() (string, error)
MkdirAllStub func(path string, perm os.FileMode) error
OpenStub func(name string) (*os.File, error)
OpenFileStub func(name string, flag int, perm os.FileMode) (*os.File, error)
RemoveAllStub func(path string) error
SetenvStub func(key, value string) error
StatStub func(name string) (os.FileInfo, error)
// contains filtered or unexported fields
}
func (*Fake) ChmodCallCount ¶
func (*Fake) ChmodReturns ¶
func (*Fake) ChmodReturnsOnCall ¶
func (*Fake) CreateArgsForCall ¶
func (*Fake) CreateCallCount ¶
func (*Fake) CreateReturnsOnCall ¶
func (*Fake) ExitArgsForCall ¶
func (*Fake) ExitCallCount ¶
func (*Fake) FindProcessArgsForCall ¶
func (*Fake) FindProcessCallCount ¶
func (*Fake) FindProcessReturns ¶
func (*Fake) FindProcessReturnsOnCall ¶
func (*Fake) GetenvArgsForCall ¶
func (*Fake) GetenvCallCount ¶
func (*Fake) GetenvReturns ¶
func (*Fake) GetenvReturnsOnCall ¶
func (*Fake) GetpidCallCount ¶
func (*Fake) GetpidReturns ¶
func (*Fake) GetpidReturnsOnCall ¶
func (*Fake) GetwdCallCount ¶
func (*Fake) GetwdReturns ¶
func (*Fake) GetwdReturnsOnCall ¶
func (*Fake) Invocations ¶
func (*Fake) MkdirAllArgsForCall ¶
func (*Fake) MkdirAllCallCount ¶
func (*Fake) MkdirAllReturns ¶
func (*Fake) MkdirAllReturnsOnCall ¶
func (*Fake) OpenArgsForCall ¶
func (*Fake) OpenCallCount ¶
func (*Fake) OpenFileArgsForCall ¶
func (*Fake) OpenFileCallCount ¶
func (*Fake) OpenFileReturnsOnCall ¶
func (*Fake) OpenReturnsOnCall ¶
func (*Fake) RemoveAllArgsForCall ¶
func (*Fake) RemoveAllCallCount ¶
func (*Fake) RemoveAllReturns ¶
func (*Fake) RemoveAllReturnsOnCall ¶
func (*Fake) SetenvCallCount ¶
func (*Fake) SetenvReturns ¶
func (*Fake) SetenvReturnsOnCall ¶
func (*Fake) StatArgsForCall ¶
func (*Fake) StatCallCount ¶
type IOS ¶
type IOS interface {
// Chmod changes the mode of the named file to mode.
// If the file is a symbolic link, it changes the mode of the link's target.
// If there is an error, it will be of type *PathError.
Chmod(name string, mode os.FileMode) error
// Create creates the named file with mode 0666 (before umask), truncating
// it if it already exists. If successful, methods on the returned
// File can be used for I/O; the associated file descriptor has mode
// O_RDWR.
// If there is an error, it will be of type *PathError.
Create(name string) (*os.File, error)
// Exit causes the current program to exit with the given status code.
// Conventionally, code zero indicates success, non-zero an error.
// The program terminates immediately; deferred functions are not run.
Exit(code int)
// FindProcess looks for a running process by its pid.
//
// The Process it returns can be used to obtain information
// about the underlying operating system process.
//
// On Unix systems, FindProcess always succeeds and returns a Process
// for the given pid, regardless of whether the process exists.
FindProcess(pid int) (*os.Process, error)
// Getenv retrieves the value of the environment variable named by the key.
// It returns the value, which will be empty if the variable is not present.
Getenv(key string) string
// Getpid returns the process id of the caller.
Getpid() int
// Getwd returns a rooted path name corresponding to the
// current directory. If the current directory can be
// reached via multiple paths (due to symbolic links),
// Getwd may return any one of them.
Getwd() (string, error)
// MkdirAll creates a directory named path,
// along with any necessary parents, and returns nil,
// or else returns an error.
// The permission bits perm are used for all
// directories that MkdirAll creates.
// If path is already a directory, MkdirAll does nothing
// and returns nil.
MkdirAll(path string, perm os.FileMode) error
// Open opens the named file for reading. If successful, methods on
// the returned file can be used for reading; the associated file
// descriptor has mode O_RDONLY.
// If there is an error, it will be of type *PathError.
Open(name string) (*os.File, error)
// OpenFile is the generalized open call; most users will use Open
// or Create instead. It opens the named file with specified flag
// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
// methods on the returned File can be used for I/O.
// If there is an error, it will be of type *PathError.
OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
// RemoveAll removes path and any children it contains.
// It removes everything it can but returns the first error
// it encounters. If the path does not exist, RemoveAll
// returns nil (no error).
RemoveAll(path string) error
// Setenv sets the value of the environment variable named by the key.
// It returns an error, if any.
Setenv(key, value string) error
// Stat returns a FileInfo describing the named file.
// If there is an error, it will be of type *PathError.
Stat(name string) (os.FileInfo, error)
}
virtual operating system interface
Click to show internal directories.
Click to hide internal directories.