package
3.9.5
Repository: https://github.com/jenkins-x/jx-helpers.git
Documentation: pkg.go.dev

# Functions

ContentTypeForFileName returns the MIME type for the given file name.
credit https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04.
CopyDirOverwrite copies from the source dir to the destination dir overwriting files along the way.
CopyDirPreserve copies from the src dir to the dst dir if the file does NOT already exist in dst.
credit https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04.
CopyFileOrDir copies the source file or directory to the given destination.
No description provided by the author
CreateUniqueDirectory creates a new directory but if the combination of dir and name exists then append a number until a unique name is found.
DeleteDirContents removes all the contents of the given directory.
No description provided by the author
DeleteFile deletes a file from the operating system.
DestroyFile will securely delete a file by first overwriting it with random bytes, then deleting it.
DirExists checks if path exists and is a directory.
FileExists checks if path exists and is a file.
FileIsEmpty checks if a file is empty.
FilterFileExists filters out files which do not exist.
FirstFileExists returns the first file which exists or an error if we can't detect if a file that exists.
GetIOFileHandles lazily creates a file handles object if the input is nil.
GlobAllFiles performs a glob on the pattern and then processes all the files found.
IgnoreFile returns true if the path matches any of the ignores.
No description provided by the author
ListDirectory logs the directory at path.
loads a file.
DeleteDirContents removes all the contents of the given directory.
RecreateSymLink removes any old symlink/binary if they exist and creates a new symlink from the given source.
No description provided by the author
No description provided by the author
ToValidFileSystemName converts the name to one that can safely be used on the filesystem.
UnTarFile extracts one file from the tar, or creates a directory.
untargz a tarball to a target, from http://blog.ralch.com/tutorial/golang-working-with-tar-and-gzipf.
untargz a tarball to a target including any folders inside the tarball http://blog.ralch.com/tutorial/golang-working-with-tar-and-gzipf.
Unzips the archvie into the specified directory returns an error if a general issue occurred unzipping the archive.
Unzips the specified files from the archive returns an error if any of the specified files are not found or a general issue occurred unzipping the archive.

# Constants

DefaultDirWritePermissions default permissions when creating a directory.
DefaultFileWritePermissions default permissions when creating a file.
No description provided by the author

# Structs

IOFileHandles is a struct for holding CommonOptions' In, Out, and Err I/O handles, to simplify function calls.