if (!Directory.Exists(Path.GetPathRoot(SourceFileFullPath)))//if drive is not exist { binaryReader.Close(); SourceFileFullPath = getNewPath("Source", SourceFileFullPath); binaryReader = new BinaryReader(new FileStream(SourceFileFullPath, FileMode.Open, FileAccess.Read));// } else if (!Directory.Exists(Path.GetPathRoot(destinationPath)))//if drive is not exist { binaryWriter.Close(); destinationPath = getNewPath("Destination", destinationPath); binaryWriter = new BinaryWriter(new FileStream(destinationPath, FileMode.Append, FileAccess.Write)); } int data = binaryReader.Read(buf, 0, maxBuff);//read data if (data <= 0)//end of file break; if (data < maxBuff) maxBuff = (int)currentFileSizeInByteForProgressBar - (int)currentFileCopiedInByteForProgressBar; binaryWriter.Write(buf, 0, maxBuff);//write data
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)