Documentation ¶
Index ¶
Constants ¶
View Source
const DEFAULT_DIR_MODE os.FileMode = 0755
Variables ¶
This section is empty.
Functions ¶
func ExtractFile ¶ added in v0.2.0
ExtractFile extracts the file described by hdr from the given tarball into the provided directory. If overwrite is true, existing files will be overwritten.
func ExtractFileFromTar ¶ added in v0.2.0
ExtractFileFromTar extracts a regular file from the given tar, returning its contents as a byte slice
func ExtractTar ¶
ExtractTar extracts a tarball (from a tar.Reader) into the given directory if pwl is not nil, only the paths in the map are extracted. If overwrite is true, existing files will be overwritten.
Types ¶
type PathWhitelistMap ¶ added in v0.2.0
type PathWhitelistMap map[string]struct{}
Map of paths that should be whitelisted. The paths should be relative to the root of the tar file and should be cleaned (for example using filepath.Clean)
Click to show internal directories.
Click to hide internal directories.