Documentation ¶
Index ¶
- func CopyDelFile(sourcePath, destPath string, log *logrus.Entry)
- func CopyDir(src string, dst string) (err error)
- func CopyFile(src, dst string) (err error)
- func FileExists(path string) bool
- func Move(files []Result)
- func MoveFile(source string, destination string, log *logrus.Entry)
- type Configuration
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDelFile ¶
CopyDelFile create file, copy content, delete old
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
func FileExists ¶
FileExists returns true, if file exists, false otherwise
Types ¶
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
Configuration holds the possible parameter values
func GetConfiguration ¶
func GetConfiguration() (config Configuration)
GetConfiguration returns Configuration with current values
type Result ¶
type Result struct { SourcePath string DestPath string Md5 string //[md5.Size]byte Status string Err string //error }
Result A result is the product of reading and summing a file using MD5.
func ScanDir ¶
ScanDir reads all the files in the file tree rooted at root and returns a map from file path to the MD5 sum of the file's contents. If the directory walk fails or any read operation fails, MD5All returns an error. In that case, MD5All does not wait for inflight read operations to complete.