Ejemplo n.º 1
0
 public override void Store()
 {
     using (Stream storageStream = CreateStorageStream())
     {
         if (settings.optimizeMode == ES2Settings.OptimizeMode.Fast)
         {
             WriteToStreamFast(storageStream);
         }
         else if (settings.optimizeMode == ES2Settings.OptimizeMode.LowMemory)
         {
             WriteToStreamLowMemory(storageStream);
         }
     }
     stream.Dispose();
     ES2FileUtility.Delete(settings.filenameData.filePath + "tmp");
 }
Ejemplo n.º 2
0
 public static void DeleteFile(ES2Settings settings)
 {
     if (settings.filenameData.IsFile())
     {
         if (ES2FileUtility.Exists(settings.filenameData.filePath))
         {
             ES2FileUtility.Delete(settings.filenameData.filePath);
         }
     }
     else if (settings.filenameData.IsFolder())
     {
         if (ES2DirectoryUtility.Exists(settings.filenameData.filePath))
         {
             ES2DirectoryUtility.Delete(settings.filenameData.filePath, true);
         }
     }
 }