Documentation
¶
Overview ¶
Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0
Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0
Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0
Index ¶
- func Checksum(path string) ([]byte, error)
- func ChecksumHex(path string) (string, error)
- func CopyFile(srcPath, dstPath string) error
- func DeleteFilesInDir(dirPath string) error
- func ExeShCmdStdout(command string, args ...string) (string, error)
- func ExtractCmdAndArgs(cmdLine string, sudo bool) (string, []string)
- func RunCmdOutput(command string, args ...string) (string, error)
- func RunCmdStart(command string, args ...string) (*exec.Cmd, error)
- func UnzipFromMemory(zipData []byte, targetDir string) error
- func ZipDirectoryToMemory(sourceDir string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checksum ¶ added in v0.3.0
Checksum calculates the SHA3-256 checksum of the file or directory at path.
func ChecksumHex ¶ added in v0.3.0
ChecksumHex calculates the SHA3-256 checksum of the file or directory at path and returns it as a hex-encoded string.
func DeleteFilesInDir ¶
DeleteFilesInDir deletes all files in the directory dirPath.
func ExeShCmdStdout ¶
ExeShCmdStdout executes a shell command capturing the standard output.
func ExtractCmdAndArgs ¶
ExtractCmdAndArgs extracts the command and its arguments from the output string.
func RunCmdOutput ¶
RunCmdOutput runs the specified command and returns its standard output as a string.
func RunCmdStart ¶
RunCmdStart starts the specified command and returns the *exec.Cmd for the running process.
func UnzipFromMemory ¶ added in v0.3.0
func ZipDirectoryToMemory ¶ added in v0.3.0
Types ¶
This section is empty.