Documentation
¶
Index ¶
- func CleanDir(dirPath string)
- func CleanDirFromFiles(dirPath string)
- func CopyDir(srcDirPath, dstDirPath string) error
- func CopyDirAndRenameFiles(srcDirPath, dstDirPath string, replacements map[string]string) error
- func CopyDirAndReplaceContentInFiles(srcDirPath, dstDirPath string, replacements map[string]string) error
- func CopyFile(srcPath, dstPath string) error
- func CopyFileAndReplaceContent(srcFilePath, dstFilePath string, replacements map[string]string) error
- func CreateDir(dirPath string)
- func Exists(fileOrDirPath string) bool
- func ReadFile(filePath string) string
- func ReadFileLines(filePath string) []string
- func RemoveDir(dirPath string)
- func RenameFilesInDir(dirPath string, replacements map[string]string) error
- func ReplaceFileContent(filePath string, value string, replacement string)
- func WriteFile(dstFilePath string, fileContent string, executable bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanDir ¶
func CleanDir(dirPath string)
CleanDir "cleans" the given directory by deleting and recreating it with "allow everything" rights
func CleanDirFromFiles ¶
func CleanDirFromFiles(dirPath string)
CleanDirFromFiles "cleans" the given directory from files, i.e. deletes all files (but no directories) from it
func CopyDirAndRenameFiles ¶
func CopyDirAndReplaceContentInFiles ¶
func CopyDirAndReplaceContentInFiles(srcDirPath, dstDirPath string, replacements map[string]string) error
CopyDirAndReplaceContentInFiles copies a whole directory recursively and does replacements in all files' contents as provided in the given map
func CopyFileAndReplaceContent ¶
func CopyFileAndReplaceContent(srcFilePath, dstFilePath string, replacements map[string]string) error
CopyFileAndReplaceContent copies a single file from src to dst and does replacements in the file's content as provided in the given map
func CreateDir ¶
func CreateDir(dirPath string)
CreateDir creates the given directory with "allow everything" rights
func ReadFileLines ¶
ReadFileLines ReadFile reads and returns the content of a file as an arrays of lines and encapsulates error handling
func RemoveDir ¶
func RemoveDir(dirPath string)
RemoveDir removes the given directory - just there for convenience
func ReplaceFileContent ¶
ReplaceFileContent replaces value in the file's content by replacement
Types ¶
This section is empty.