Documentation ¶
Overview ¶
Package filesystem implements some functions and error handling for working with files and directories.
Index ¶
- func CheckForExecutable(exe string) (path string, err error)
- func CreateDir(path string) (err error)
- func DirExists(path string) bool
- func DownloadFile(url *url.URL, filePath string) (err error)
- func RemoveFile(filePath string) error
- type ErrDirDoesNotExist
- type ErrExeNotFound
- type ErrFileDoesNotExist
- type ErrHTTP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForExecutable ¶ added in v0.7.0
CheckForExecutable checks if an executable exists in the path.
func DirExists ¶ added in v0.7.0
DirExists returns true if the given path exists and is a directory.
func DownloadFile ¶ added in v0.9.0
DownloadFile downloads a file from a URL.
func RemoveFile ¶ added in v0.7.0
RemoveFile removes the given file if it exists.
Types ¶
type ErrDirDoesNotExist ¶ added in v0.9.0
type ErrDirDoesNotExist struct {
DirName string
}
func (ErrDirDoesNotExist) Error ¶ added in v0.9.0
func (e ErrDirDoesNotExist) Error() string
type ErrExeNotFound ¶ added in v0.9.0
func (ErrExeNotFound) Error ¶ added in v0.9.0
func (e ErrExeNotFound) Error() string
type ErrFileDoesNotExist ¶ added in v0.9.0
type ErrFileDoesNotExist struct {
FileName string
}
func (ErrFileDoesNotExist) Error ¶ added in v0.9.0
func (e ErrFileDoesNotExist) Error() string
Click to show internal directories.
Click to hide internal directories.