Documentation ¶
Index ¶
- func DownloadAndExtractTarball(url string, removeTopLevel bool) (string, func(), error)
- func ExtractTarballWithCleanup(tarball string, removeTopLevel bool) (string, func(), error)
- func Tar(src string, tarballFilePath string, exclusion string) error
- func UnBzip2(source string, destDirectory string) error
- func UnXz(source string, destDirectory string) error
- func Ungzip(source string, destDirectory string) error
- func Untar(source string, dest string, extractionDir string) error
- func Unzip(source string, dest string, extractionDir string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadAndExtractTarball ¶ added in v1.21.5
DownloadAndExtractTarball takes an url to a tar.gz file and extracts into a new a temp directory and the directory and a cleanup function. It's the caller's responsibility to call the cleanup function.
func ExtractTarballWithCleanup ¶ added in v1.21.5
ExtractTarballWithCleanup takes a tarball file and extracts it into a temp directory Caller is responsible for cleanup of the temp directory using the returned cleanup function. If removeTopLevel is true, the top level directory will be removed.
func Tar ¶ added in v1.21.5
Tar takes a source dir and tarballFilePath and a single exclusion path It creates a gzipped tarball. So sorry that exclusion is a single relative path. It should be a set of patterns, rfay 2021-12-15
func UnBzip2 ¶ added in v1.21.5
UnBzip2 accepts a bzip2-compressed file and uncompresses it to the provided destination directory.
func UnXz ¶ added in v1.21.5
UnXz accepts an xz-compressed file and uncompresses it to the provided destination directory.
func Ungzip ¶
Ungzip accepts a gzipped file and uncompresses it to the provided destination directory.
func Untar ¶
Untar accepts a tar, tar.gz, tar.bz2, tar.xz file and extracts the contents to the provided destination path. extractionDir is the path at which extraction should start; nothing will be extracted except the contents of extractionDir. If extranctionDir is empty, the entire tarball is extracted.
Types ¶
This section is empty.