private void CopiesFile(SimpleFile file, ConnectionInfo inf) { string path = Directory.GetCurrentDirectory() + @"\Dir"; DirectoryInfo info = Directory.CreateDirectory(path); info.Attributes = info.Attributes & ~FileAttributes.ReadOnly; try { var fi = file.CopyToPath(path); if (Copied(path, fi.FullPath) && !Deleted()) { condition = true; } fi.Delete(); fi.Dispose(); file.Delete(); } finally { Directory.Delete(path, true); } }
private void DeletesFile(SimpleFile file, ConnectionInfo inf) { file.Delete(); if (Deleted()) { condition = true; } }
private void CopiesAndOverwries(SimpleFile file, ConnectionInfo inf) { string path = Directory.GetCurrentDirectory() + @"\Dir"; Directory.CreateDirectory(path); file.CopyToPath(path, OverwriteFile: true).Dispose(); var fi = file.CopyToPath(path, OverwriteFile: true); if (Copied(path, fi.FullPath) && !Deleted()) { condition = true; } fi.Delete(); fi.Dispose(); file.Delete(); Directory.Delete(path, true); }
private void ServerFileRecieve(SimpleFile file, ConnectionInfo inf) { files++; file.Delete(); }
private void ClientFileReceive(SimpleFile file) { files++; file.Delete(); }