# Functions
AbsTarPath checks whether path 'tarPath' exists and whether path 'tarPath' ends with '.tar' And after checking, absTarPath return the abs path for 'tarPath'.
CheckPackageSum will check whether the 'checkedSum' is equal to the hash of the package under 'localPath'.
CreateFileIfNotExist will check whether the file under a certain path 'filePath/fileName' exists, and return an error if it exists, and call the method 'storeFunc' to save the file if it does not exist.
DefaultKpmHome create the '.kpm' in the user home and return the path of ".kpm".
CreateSymlink will create symbolic link named 'newName' for 'oldName', and if the symbolic link already exists, it will be deleted and recreated.
DirExists will check whether the directory 'path' exists.
Whether the file exists.
ExtractTarball support extracting tarball with '.tgz' format.
FindKFiles will find all the '.k' files in the 'path' directory.
FindPackage finds the package with the package name 'targetPackage' under the 'root' directory kcl.mod file.
Copied/Adapted from https://github.com/helm/helm.
HashDir computes the checksum of a directory by concatenating all files and hashing them by sha256.
IsGitRepoUrl will check whether the string 'str' is a git repo url.
IsKfile will check whether the string 'str' is a k file path.
If the path preffix is `${KCL_MOD}` or `${KCL_MOD:xxx}`.
IsRef will check whether the string 'str' is a reference.
IsSymlinkValidAndExists will check whether the symlink exists and points to a valid target return three values: whether the symlink exists, whether it points to a valid target, and any error encountered Note: IsSymlinkValidAndExists is only useful on unix-like systems.
IsTar will check whether the string 'str' is a tar path.
IsUrl will check whether the string 'str' is a url.
JoinPath will join the 'elem' to the 'base' with '/'.
MoveFile will move the file from 'src' to 'dest'.
ParseRepoNameFromGitUrl get the repo name from git url, the repo name in 'https://github.com/xxx/kcl1.git' is 'kcl1'.
RmNewline will remove all the '\r\n' and '\n' in the string 's'.
StoreToFile will store 'data' into toml file under 'filePath'.
No description provided by the author
UnTarDir will extract tar from 'tarPath' to 'destDir'.
# Constants
No description provided by the author