Documentation
¶
Index ¶
- type DirEntry
- type Executor
- type ExecutorImpl
- type FileSystem
- type FileSystemImpl
- func (f *FileSystemImpl) BaseName(path string) string
- func (f *FileSystemImpl) EnsureDir(dir string) error
- func (f *FileSystemImpl) Exists(path string) bool
- func (f *FileSystemImpl) ReadDir(path string) ([]DirEntry, error)
- func (f *FileSystemImpl) ReadFile(path string) ([]byte, error)
- func (f *FileSystemImpl) WriteFile(path string, data []byte, perm int) error
- type Logger
- type LoggerImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface {
Run(name string, args ...string) (string, error)
RunInDir(dir, name string, args ...string) (string, error)
RunOsascript(script string) string
Which(cmd string) bool
}
Executor abstracts command execution and PATH lookups.
type ExecutorImpl ¶
type ExecutorImpl struct{}
ExecutorImpl is the real OS-backed Executor.
func (*ExecutorImpl) RunInDir ¶
func (e *ExecutorImpl) RunInDir(dir, name string, args ...string) (string, error)
func (*ExecutorImpl) RunOsascript ¶
func (e *ExecutorImpl) RunOsascript(script string) string
func (*ExecutorImpl) Which ¶
func (e *ExecutorImpl) Which(cmd string) bool
type FileSystem ¶
type FileSystem interface {
Exists(path string) bool
EnsureDir(dir string) error
ReadFile(path string) ([]byte, error)
WriteFile(path string, data []byte, perm int) error
ReadDir(path string) ([]DirEntry, error)
BaseName(path string) string
}
FileSystem abstracts file and directory operations.
type FileSystemImpl ¶
type FileSystemImpl struct{}
FileSystemImpl is the real OS-backed FileSystem.
func NewFileSystem ¶
func NewFileSystem() *FileSystemImpl
NewFileSystem returns a new FileSystemImpl.
func (*FileSystemImpl) BaseName ¶
func (f *FileSystemImpl) BaseName(path string) string
func (*FileSystemImpl) EnsureDir ¶
func (f *FileSystemImpl) EnsureDir(dir string) error
func (*FileSystemImpl) Exists ¶
func (f *FileSystemImpl) Exists(path string) bool
Click to show internal directories.
Click to hide internal directories.