Documentation ¶
Index ¶
- func CreateGZipArchive(files []string, buf io.Writer) error
- func CreateZipArchive(files []string, buf io.Writer) error
- func GZip(files []string, outputTarFilename string) error
- func GZipDecompress(filePath, outputDir string) error
- func GetAllFiles(localPath string, skip ...string) ([]string, error)
- func GetRelativePath(file string, baseDir string) string
- func UnZip(zipFileName string, destDir string) error
- func Zip(files []string, outputZipFilename string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGZipArchive ¶
func GZipDecompress ¶
GZipDecompress decompresses a .tar.gz file to a specified output directory
func GetAllFiles ¶
Returns all the files in the directory. Recurses to find all the paths in parallel using walkman module. skip: names of files to ignore e.g .git, .env etc
func GetRelativePath ¶
GetRelativePaths returns a file path with the given base directory removed and the directory name of the base directory added to the start of each path. It takes a path to a file and a base directory as input parameters. The function removes the base directory from each file path in the input slice, and removes the leading path separator if any. Then it joins the directory name of the base directory and the relative path using `filepath.Join`, and finally returns the new relative file path.
Types ¶
This section is empty.