Documentation ¶
Overview ¶
Package kopy stored all the copy operations for gokopy.
Index ¶
- Constants
- Variables
- func AddFileToZip(zipWriter *zip.Writer, filename string) error
- func ComFiles(dest string, files []string) error
- func CompressDIR(src string, buf io.Writer, ignoreFT []string) error
- func CopyDir(src, dst string, isLogCopiedFile bool) (int, int, error)
- func CopyFile(src, dst, bareDst string) error
- func DIRCopyFiles(src, dst string) error
- func ExtractTarGz(gzipStream io.Reader, src string, isLogCopiedFile bool) error
- func FileNameWOExt(fileName string) string
- func InitConfig()
- func LoadInitVars()
- func Unzip(src string, isLogCopiedFile bool) error
- func WalkDIRModLatest(src, dst string, modDays int, logCopiedFile bool) error
Constants ¶
const ComFileFormat = ".tar.gz"
ComFileFormat compression file extentions.
const ComSingleFileFormat = ".zip"
ComSingleFileFormat use zip compression format for any single file need to be compressed.
Variables ¶
var BKMaxAgeLogInDays int = 0 // 0 days means, it won't delete older backup logs
BKMaxAgeLogInDays get the max age of a log files in days.
var BKMaxLogFileSizeInMB int = 100 // mb
BKMaxLogFileSizeInMB gets the max log file size value in megabytes.
var NumFilesCopied int = 0
NumFilesCopied counts the number of files copied.
var NumFoldersCopied int = 0
NumFoldersCopied counts the number of folders copied.
Functions ¶
func AddFileToZip ¶
AddFileToZip where to
func CompressDIR ¶
CompressDIR compressed the entire folder or directory.
func DIRCopyFiles ¶
DIRCopyFiles copy a single file from the source to the destination.
func ExtractTarGz ¶
ExtractTarGz extracts the tar.gz compressed file.
func FileNameWOExt ¶
FileNameWOExt gets the filename without its file extension.
func LoadInitVars ¶
func LoadInitVars()
LoadInitVars is to load common configurations during init method.
Types ¶
This section is empty.