Documentation ¶
Index ¶
- func CollectFilesWithExt(root, ext string) ([]string, error)
- func ComputeDirectoryHash(dir string) (string, error)
- func ComputeFileChecksum(filePath string) (string, error)
- func CopyFS(srcFS fs.FS, destRoot string, options ...CopyOption) error
- func CopyFile(srcFS fs.FS, srcPath, destPath string, perm fs.FileMode) error
- func GetBaseName(fileName string) string
- func GetDirName(filePath string) string
- func OpenTarFile(source string, fpath string) ([]byte, error)
- func OpenZipFile(source string, fpath string) ([]byte, error)
- func ReadJSON(fName string, v interface{}) error
- func ReplaceWithCopy(src, dst string) error
- func ReplaceWithMove(src, dst string) error
- func SecureUntar(src string, dest string) error
- func SecureUnzip(src string, dest string) error
- func WriteJSON(fName string, v interface{}) error
- type CopyConfig
- type CopyOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectFilesWithExt ¶ added in v0.17.0
func ComputeDirectoryHash ¶ added in v0.17.0
func ComputeFileChecksum ¶ added in v0.14.0
func CopyFS ¶ added in v0.17.0
func CopyFS(srcFS fs.FS, destRoot string, options ...CopyOption) error
copyFS copies files and directories from srcFS to destRoot securely.
func CopyFile ¶ added in v0.17.0
copyFile copies a single file from srcFS to destPath, preserving permissions.
func GetBaseName ¶
GetBaseName Get filename without extension.
func GetDirName ¶
func ReplaceWithCopy ¶ added in v0.17.0
Copy directory from src to dst remove dst repository if it exists
func ReplaceWithMove ¶ added in v0.17.0
func SecureUntar ¶ added in v0.17.0
Secure untar function
func SecureUnzip ¶ added in v0.17.0
Secure unzip function
Types ¶
type CopyConfig ¶ added in v0.17.0
type CopyOption ¶ added in v0.17.0
type CopyOption func(*CopyConfig)
func WithOverwrite ¶ added in v0.17.0
func WithOverwrite(overwrite bool) CopyOption
func WithPreservePermissions ¶ added in v0.17.0
func WithPreservePermissions(preserve bool) CopyOption
func WithRoot ¶ added in v0.17.0
func WithRoot(root string) CopyOption
Click to show internal directories.
Click to hide internal directories.