public void SkipCurrentFile(bool fastMove) { if (!File.Exists(CurrentFile.DestinyPath)) { CurrentFile.CopyState = CopyState.Processing; DiscoverdList.SizeOfFilesToCopy -= CurrentFile.Size; if (fastMove) { Alphaleonis.Win32.Filesystem.File.Move(CurrentFile.FullName, CurrentFile.DestinyPath); } else { FileCopier.CopyFile(CurrentFile); } AffterFileCopyAction.Invoke(CurrentFile); } else { FileCopier.TotalBytesTransferred += CurrentFile.Size; FileCollisionAction = AllwaysAsk; } }
public void AllwaysAsk(bool fastMove) { //Copy the current file. if (File.Exists(CurrentFile.DestinyPath)) { if (FileCollisionAction == CancelCollision) { return; } FileCollisionAction = FileExist(this, CurrentFile); FileCollisionAction.Invoke(fastMove); } else { CurrentFile.CopyState = CopyState.Processing; DiscoverdList.SizeOfFilesToCopy -= CurrentFile.Size; if (fastMove) { Alphaleonis.Win32.Filesystem.File.Move(CurrentFile.FullName, CurrentFile.DestinyPath); } else { FileCopier.CopyFile(CurrentFile); } AffterFileCopyAction.Invoke(CurrentFile); } }
public void OverwriteAll(bool fastMove) { //Copy the current file. CurrentFile.CopyState = CopyState.Processing; DiscoverdList.SizeOfFilesToCopy -= CurrentFile.Size; if (fastMove) { if (Alphaleonis.Win32.Filesystem.File.Exists(CurrentFile.DestinyPath)) { Alphaleonis.Win32.Filesystem.File.Delete(CurrentFile.DestinyPath); } Alphaleonis.Win32.Filesystem.File.Move(CurrentFile.FullName, CurrentFile.DestinyPath); } else { FileCopier.CopyFile(CurrentFile); AffterFileCopyAction.Invoke(CurrentFile); } }