Documentation ¶
Overview ¶
ddcio include helper code for io operations common to ddc
ddcio include helper code for io operations common to ddc
Index ¶
- func CopyDir(src, dst string) error
- func CopyFile(srcPath, dstPath string) error
- func DeleteDirContents(dir string) error
- func EnsureClose(fileName string, f func() error)
- func GetFilesInDir(dir string) ([]os.DirEntry, error)
- func GzipFile(src, dst string) error
- func Shell(hook shutdown.CancelHook, writer io.Writer, commandLine string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
CopyDir recursively copies a source directory to a destination. It does not copy file attributes, but does maintain directory structure. If the destination directory does not exist, CopyDir creates it. If a file with the same name exists at the destination, CopyDir overwrites it.
func DeleteDirContents ¶
func EnsureClose ¶
EnsureClose logs a failure when the close does not succeed this should not be used with "just in case closes" and should indeed signal an error
func GetFilesInDir ¶
GetFilesInDir retrieves a list of directory entries for the given directory. It returns a slice of os.DirEntry representing the files and subdirectories in the directory. An error is returned if there is a problem reading the directory.
Types ¶
This section is empty.