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 ¶
func ComputeDirectoryHash ¶
func ComputeFileChecksum ¶
func CopyFS ¶
func CopyFS(srcFS fs.FS, destRoot string, options ...CopyOption) error
copyFS copies files and directories from srcFS to destRoot securely.
func GetBaseName ¶
GetBaseName Get filename without extension.
func GetDirName ¶
func ReplaceWithCopy ¶
Copy directory from src to dst remove dst repository if it exists
func ReplaceWithMove ¶
Types ¶
type CopyConfig ¶
type CopyOption ¶
type CopyOption func(*CopyConfig)
func WithOverwrite ¶
func WithOverwrite(overwrite bool) CopyOption
func WithPreservePermissions ¶
func WithPreservePermissions(preserve bool) CopyOption
func WithRoot ¶
func WithRoot(root string) CopyOption
Click to show internal directories.
Click to hide internal directories.