Ejemplo n.º 1
0
 /// <summary>
 /// Creates a Halva package in memory. This is used to update an archive or export some files.
 /// </summary>
 /// <param name="source">The source archive.</param>
 public HalvaPackage(string source)
 {
     WorkingArchive      = ReserveRandomArchive();
     SourceLocation      = new StringBuilder(Path.GetDirectoryName(source));
     DestinationLocation = new StringBuilder(source);
     PackageUtilities.DecompressArchive(DestinationLocation.ToString(), WorkingArchive);
     ArchiveMemoryStream = ZipFile.Open(WorkingArchive, ZipArchiveMode.Update);
     FileList            = PullFiles(ArchiveMemoryStream);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Reloads the archive for editing.
 /// </summary>
 public void ReloadArchive()
 {
     PackageUtilities.DecompressArchive(DestinationLocation.ToString());
     ArchiveMemoryStream = ZipFile.Open(WorkingArchive, ZipArchiveMode.Update);
 }