Documentation
¶
Overview ¶
Package file implements file related utility functions.
Index ¶
- func Copy(src, dst string) error
- func CopyDir(src, dst string) error
- func CopyDirExclude(src, dst string, excludePaths []string) error
- func Download(filepath string, url string) error
- func Exists(filename string) (bool, error)
- func IsBinary(filename string) (bool, error)
- func List(dir string) ([]string, error)
- func RemoveAll(path string, excludePaths []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy source file src to destination file dst. The destination file must not exist already. The source file must exist already and be a regular file.
func CopyDir ¶
CopyDir recursively copies the source directory src to destination directory dst. The source directory must exist already and only contain regular files and directories. The destination directory must not exist already.
func CopyDirExclude ¶
CopyDirExclude recursively copies the source directory src to destination directory dst, except for paths contained in excludePath. The source directory must exist already and only contain regular files and directories. The destination directory must not exist already.
func Download ¶
Download file from url and write it to filepath. If the file with filepath already exists, it will be overwritten!
func IsBinary ¶
IsBinary returns true if filename is binary and false otherwise. A binary file is defined as a file that doesn't consist entirely of valid UTF-8-encoded runes
Types ¶
This section is empty.