Documentation ¶
Overview ¶
Package provides wrapper aound os module for purpose of testing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultOS ¶
type DefaultOS struct { }
DefaultOS is a default implementation of OS interface which proxies everything to standard lib.
func (DefaultOS) AppendFile ¶
appendFile returns a file opened for write with cursor positioned at the end of file.
func (DefaultOS) CreateIfMissing ¶
createIfMissing tries create file if it's not there yet, otherwise no op.
type FakeFileInfo ¶
type FakeFileInfo struct {
// contains filtered or unexported fields
}
func (FakeFileInfo) IsDir ¶
func (f FakeFileInfo) IsDir() bool
func (FakeFileInfo) ModTime ¶
func (f FakeFileInfo) ModTime() time.Time
func (FakeFileInfo) Mode ¶
func (f FakeFileInfo) Mode() os.FileMode
func (FakeFileInfo) Name ¶
func (f FakeFileInfo) Name() string
func (FakeFileInfo) Size ¶
func (f FakeFileInfo) Size() int64
func (FakeFileInfo) Sys ¶
func (f FakeFileInfo) Sys() interface{}
type FakeOS ¶
FakeOS implements OS.
func (*FakeOS) AppendFile ¶
appendFile returns a FakeFile implementation that will record any data it receives for later analisis.
func (*FakeOS) CreateIfMissing ¶
createIfMissing No op in tests.
Click to show internal directories.
Click to hide internal directories.