Documentation
¶
Index ¶
- func CopyFile(src, dst string) error
- func CreateDirIfNotExists(path string) error
- func CreateDirIfNotExistsWithPerm(path string, perm os.FileMode) error
- func DirExists(path string) bool
- func ListFilesWithExt(dir, ext string) ([]string, error)
- func PathExists(path string) bool
- func SafeRemove(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶
CopyFile copies a file from src to dst. If dst already exists, it will be overwritten.
func CreateDirIfNotExists ¶
CreateDirIfNotExists creates a dir at a specified path if it does not exists
func CreateDirIfNotExistsWithPerm ¶
CreateDirIfNotExistsWithPerm creates a dir at a specified path and perm if it does not exists
func ListFilesWithExt ¶
ListFilesWithExt returns a list of files in the given directory with the specified extension. The extension should include the dot, e.g. ".go"
func PathExists ¶
PathExists checks if a directory or a file exists at the given path
func SafeRemove ¶
SafeRemove removes a file or directory if it exists, and does nothing if it doesn't exist
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.