//# __________ PROTOCOL :: PRIVATE (UPLOAD STEPS) __________ #// /** * Delete any directory who is not uploadable, this is true if: * 1) An error occured copying this directory from output * 2) An error occured after deleting this directory after upload complete. **/ public void VerifyUploadDirectories() { DirectoryInfo[] dia = GetUploadDirectories(); foreach( DirectoryInfo uploadDir in dia) { VmUploadDirectoryManager o = new VmUploadDirectoryManager(uploadDir.FullName); if( ! o.HasUploadableCookie() ) o.Delete(); } }
public void RemoveOutputDirectory(VmUploadDirectoryManager manager) { if( manager == null ) return; if( ! manager.HasUploadableCookie() ) throw new Exception("ERROR: Unable to prepare for upload. (100)"); DirectoryInfo di; di = new DirectoryInfo(VmAccountData.Default.GetAccountOutputPath()); if( di.Exists ) di.Delete(true); di = new DirectoryInfo(VmAccountData.Default.GetAccountOutputPath()); if( di.Exists ) throw new Exception("ERROR: Unable to prepare for upload. (101)"); }