Documentation ¶
Index ¶
- func Copy(src string, dst string) error
- func CopyFromReader(src io.Reader, dst string, mode os.FileMode) (int64, error)
- func Exists(path string) bool
- func GetBaseName(filename string) string
- func Getter(url, dst string) error
- func GzipFile(path string) ([]byte, error)
- func IsValidPathType(input string, extensions ...string) bool
- func SafeRead(path string) string
- func TempFileName(prefix, suffix string) string
- func Unarchive(src, dest string) error
- func UnarchiveExecutables(src, dest string) error
- func Ungzip(source, target string) error
- func Untar(tarball, target string) error
- func UntarWithFilter(tarball, target string, filter FileFilter) error
- func Unxz(source, target string) error
- func Unzip(src, dest string) error
- func Zip(src, dst string) error
- type FileFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFromReader ¶
func GetBaseName ¶
GetBaseName returns the base part of the filename without the extension
func Getter ¶
Getter gets a directory or file using the Hashicorp go-getter library See https://github.com/hashicorp/go-getter
func IsValidPathType ¶ added in v1.5.5
func TempFileName ¶
TempFileName generates a temporary filename for
func UnarchiveExecutables ¶
UnarchiveExecutables extracts all executable's to the dest directory, ignoring any path's specified by the archive
func UntarWithFilter ¶
func UntarWithFilter(tarball, target string, filter FileFilter) error
UntarWithFilter extracts all files in tarball to the target directory, passing each file to filter if the filter returns "" then the file is ignored, otherwise the return string is used as the relative destination path
Types ¶
type FileFilter ¶
FileFilter is a function used for filtering files
Click to show internal directories.
Click to hide internal directories.