Archive Class

This class represents zip archive file. Use it to compose, extract, or update zip archives.
Inheritance Hierarchy
SystemObject
  Aspose.ZipArchive

Namespace:  Aspose.Zip
Assembly:  Aspose.Zip (in Aspose.Zip.dll) Version: 22.1
Syntax
public class Archive : IDisposable

The Archive type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleArchive(ArchiveEntrySettings)
Initializes a new instance of the Archive class with optional settings for its entries.
Public methodCode exampleArchive(Stream, ArchiveLoadOptions, ArchiveEntrySettings)
Initializes a new instance of the Archive class and composes entries list can be extracted from the archive.
Public methodCode exampleArchive(String, ArchiveLoadOptions, ArchiveEntrySettings)
Initializes a new instance of the Archive class and composes entries list can be extracted from the archive.
Properties
  NameDescription
Public propertyEntries
Gets entries of ArchiveEntry type constituting the archive.
Public propertyNewEntrySettings
Compression and encryption settings used for newly added ArchiveEntry items.
Methods
  NameDescription
Public methodCode exampleCreateEntries(DirectoryInfo, Boolean)
Adds to the archive all files and directories recursively in the directory given.
Public methodCode exampleCreateEntries(String, Boolean)
Adds to the archive all files and directories recursively in the directory given.
Public methodCode exampleCreateEntry(String, Stream, ArchiveEntrySettings)
Create single entry within the archive.
Public methodCode exampleCreateEntry(String, FileInfo, Boolean, ArchiveEntrySettings)
Create single entry within the archive.
Public methodCode exampleCreateEntry(String, Stream, ArchiveEntrySettings, FileSystemInfo)
Create single entry within the archive.
Public methodCode exampleCreateEntry(String, String, Boolean, ArchiveEntrySettings)
Create single entry within the archive.
Public methodCode exampleDeleteEntry(ArchiveEntry)
Removes the first occurrence of a specific entry from the entries list.
Public methodCode exampleDeleteEntry(Int32)
Removes the entry from the entries list by index.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodCode exampleExtractToDirectory
Extracts all the files in the archive to the directory provided.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodCode exampleSave(Stream, ArchiveSaveOptions)
Saves archive to the stream provided.
Public methodCode exampleSave(String, ArchiveSaveOptions)
Saves archive to destination file provided.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
See Also