Documentation ¶
Index ¶
- func CreateRecursiveDir(completePath string) error
- func DeleteFiles(path string, wildCard string)
- func DeleteTmpDir(outputDir string) error
- func GetCurrentTime() string
- func GetEntropy(data string) (entropy float64)
- func GetHash(s string) string
- func GetJSONFilepath(jsonFilename, outputPath string) (string, error)
- func GetTimestamp() int64
- func GetTmpDir(imageName, tempDirectory string) (string, error)
- func IsSharedLibrary(path string) bool
- func IsSkippableDir(excludedPaths []string, path, baseDir string) bool
- func IsSkippableFileExtension(excludedExtensions []string, path string) bool
- func IsSymLink(path string) bool
- func LogIfError(text string, err error)
- func PathExists(path string) bool
- func Pluralize(count int, singular string, plural string) string
- func UpdateDirsPermissionsRW(dir string) error
- type MatchFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRecursiveDir ¶
CreateRecursiveDir Create directory structure recursively, if they do not exist @parameters completePath - Complete path of directory which needs to be created @returns Error - Errors if any. Otherwise, returns nil
func DeleteFiles ¶
DeleteFiles Delete all the files and dirs recursively in specified directory @parameters path - Directory whose contents need to be deleted wildcard - patterns to match the filenames (e.g. '*')
func DeleteTmpDir ¶
DeleteTmpDir Delete the temporary directory @parameters outputDir - Directory which need to be deleted @returns Error - Errors if any. Otherwise, returns nil
func GetCurrentTime ¶
func GetCurrentTime() string
func GetEntropy ¶
func GetJSONFilepath ¶
GetJSONFilepath Return complete path and filename for json output file @parameters image - Name of the container image or dir, for which json filename and path will be created @returns string - Sanitized string which can used as path and filename of json output file Error - Errors if path can't be created. Otherwise, returns nil
func GetTimestamp ¶
func GetTimestamp() int64
func GetTmpDir ¶
GetTmpDir Create a temporrary directory to extract the conetents of container image @parameters imageName - Name of the container image @returns String - Complete path of the based directory where image will be extracted, empty string if error Error - Errors if any. Otherwise, returns nil
func IsSharedLibrary ¶
IsSharedLibrary Checks if the file is a shared library
func IsSkippableDir ¶
IsSkippableDir Checks if the path is excluded
func IsSkippableFileExtension ¶
IsSkippableFileExtension Checks if the file extension is excluded
func IsSymLink ¶
IsSymLink Check if input is a symLink, not normal file/dir path - Pathname which needs to be checked for symbolic link @returns bool - Return true if input is a symLink
func LogIfError ¶
func PathExists ¶
func UpdateDirsPermissionsRW ¶
UpdateDirsPermissionsRW Update permissions for dirs in container images, so that they can be properly deleted