Documentation
¶
Index ¶
- func Copy(srcPath, destPath string) error
- func CopyDir(srcDir, destDir string) error
- func CopyDotFiles(src, dst string, logger hclog.Logger) error
- func CopyFile(srcFile, destFile string) error
- func CopySymLink(srcLink, destLink string) error
- func CreateFolderIfNotExists(folder string) error
- func DetermineFileFullPath(path, nameTemplate string) (string, string, error)
- func ExpandPath(path string) (string, error)
- func FindByExtAndRemove(root string, exts []string)
- func GetValidatedFileName(path string) (string, error)
- func ValidatePath(path string) error
- func WriteJsonFile(outputFile string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy determines the type of source (file, directory, or symlink) and copies it accordingly.
func CopyDotFiles ¶
CopyDotFiles copies files and directories starting with a dot from src to dst.
func CopySymLink ¶
CopySymLink copies a symbolic link from srcLink to destLink.
func CreateFolderIfNotExists ¶
CreateFolderIfNotExists checks if a folder exists, and if not, creates it.
func DetermineFileFullPath ¶ added in v0.3.0
func ExpandPath ¶
ExpandPath resolves paths that include a tilde (~) to the user's home directory.
func FindByExtAndRemove ¶
FindByExtAndRemove walks through the directory tree rooted at root and removes files with specified extensions.
func GetValidatedFileName ¶
GetValidatedFileName validates the given file path and returns the file name.
func ValidatePath ¶
ValidatePath checks if the given path is a valid file path for reading.
func WriteJsonFile ¶
WriteJsonFile writes JSON data to the specified file.
Types ¶
This section is empty.