Documentation
¶
Index ¶
- func CopyDir(src, dst string) error
- func CopyDirFiltered(src, dst string, include func(relPath string, d os.DirEntry) bool) error
- func CopyFile(src, dst string) error
- func ExtractZip(zipPath, destDir string) error
- func IsDirExists(d string) bool
- func IsExists(filePath string) (bool, error)
- func RenderTemplate(input interface{}, templateString string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶ added in v0.3.29
CopyDir recursively copies the directory tree rooted at src into dst, preserving file modes. dst is created if it does not exist.
func CopyDirFiltered ¶ added in v0.3.29
CopyDirFiltered recursively copies the directory tree rooted at src into dst, preserving file modes. When include is non-nil it is consulted with each entry's path relative to src; entries it rejects are skipped (for a directory, the whole subtree).
Only directories and regular files are copied. Anything else (symlinks, devices) fails loudly: silently dropping or dereferencing an entry would produce a copy that looks complete but is not.
func CopyFile ¶ added in v0.3.29
CopyFile copies a single regular file from src to dst, preserving the file mode. The destination's parent directory must already exist.
func ExtractZip ¶ added in v0.3.29
ExtractZip extracts a zip archive into destDir, creating directories as needed and preserving file modes. Entries whose paths would escape destDir (zip slip) are rejected.
func RenderTemplate ¶
Types ¶
This section is empty.