Package fileutils
provides useful, high-level file operations.
IsFile
&IsDir
checks if file/directory existsCopyFile
copies a file from source to destination, preserving modeCopyDir
copies all files recursively from the source to destination directoryMoveFile
moves a file, using atomic rename when possible with copy+delete fallbackListFiles
returns sorted slice of file paths in directoryTempFileName
returns a new temporary file name using secure random generationSanitizePath
cleans file pathTouchFile
creates an empty file or updates timestamps of existing one
go get -u github.com/go-pkgz/fileutils