Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileInfo ¶
type FileInfo struct {
FileName string
FileSize int64
FileMode os.FileMode
FileModTime time.Time
FileIsDir bool
FileSys interface{}
}
FileInfo is a struct which implements os.FileInfo. We use it (a) for test purposes, and (b) because we enrich the FileMode on Windows systems
type FileSystem ¶
type FileSystem interface {
Chmod(file string, mode os.FileMode) error
Rename(from, to string) error
MkdirAll(dirname string) error
MkdirAllWithPermissions(dirname string, perm os.FileMode) error
Mkdir(dirname string) error
Exists(file string) bool
Copy(sourcePath, targetPath string, filesToIgnore map[string]string) error
CopyContents(sourcePath, targetPath string, filesToIgnore map[string]string) error
RemoveDirectory(dir string) error
CreateWorkingDirectory() (string, error)
Open(file string) (io.ReadCloser, error)
Create(file string) (io.WriteCloser, error)
WriteFile(file string, data []byte) error
ReadDir(string) ([]os.FileInfo, error)
Stat(string) (os.FileInfo, error)
Lstat(string) (os.FileInfo, error)
Walk(string, filepath.WalkFunc) error
Readlink(string) (string, error)
Symlink(string, string) error
KeepSymlinks(bool)
ShouldKeepSymlinks() bool
}
FileSystem allows STI to work with the file system and perform tasks such as creating and deleting directories
func NewFileSystem ¶
func NewFileSystem() FileSystem
NewFileSystem creates a new instance of the default FileSystem implementation
Click to show internal directories.
Click to hide internal directories.