Example #1
0
 public CopyMoveTask(string[] sourcefolders, string target, CopyJobType copyType)
 {
     this.sourcefolders = sourcefolders.Select(f => f.TrimEnd('\\')).ToArray();
     this.target        = target.TrimEnd('\\');
     this.copyType      = copyType;
     this.ReadingVolume = ZlpPathHelper.GetPathRoot(this.sourcefolders.First()).TrimEnd('\\');
     this.WritingVolume = ZlpPathHelper.GetPathRoot(this.target).TrimEnd('\\');
     this.Action        = copyType == CopyJobType.Move ? "Moving" : copyType == CopyJobType.Compare ? "Comparing" : "Copying";
 }
Example #2
0
 public FileJob(IZlpFileSystemInfo Source, IZlpFileSystemInfo Target, CopyJobType CopyType, Func <bool> checkCancel)
 {
     this.Source      = Source;
     this.Target      = Target;
     this.CopyType    = CopyType;
     this.checkCancel = checkCancel;
     FileSize         = (Source as ZlpFileInfo)?.Length ?? (Target as ZlpFileInfo)?.Length ?? 1;
     TotalProgress    = (CopyType == CopyJobType.Copy || CopyType == CopyJobType.Move) ? FileSize * 2 : FileSize;
     IsFile           = Source is ZlpFileInfo;
 }