Archive

Archive class

This class represents zip archive file. Use it to compose, extract, or update zip archives.

public class Archive : IDisposable

Constructors

Name Description
Archive(ArchiveEntrySettings) Initializes a new instance of the Archive class with optional settings for its entries.
Archive(Stream, ArchiveLoadOptions, ArchiveEntrySettings) Initializes a new instance of the Archive class and composes entries list can be extracted from the archive.
Archive(string, ArchiveLoadOptions, ArchiveEntrySettings) Initializes a new instance of the Archive class and composes entries list can be extracted from the archive.

Properties

Name Description
Entries { get; } Gets entries of ArchiveEntry type constituting the archive.
NewEntrySettings { get; } Compression and encryption settings used for newly added ArchiveEntry items.

Methods

Name Description
CreateEntries(DirectoryInfo, bool) Adds to the archive all files and directories recursively in the directory given.
CreateEntries(string, bool) Adds to the archive all files and directories recursively in the directory given.
CreateEntry(string, Stream, ArchiveEntrySettings) Create single entry within the archive.
CreateEntry(string, FileInfo, bool, ArchiveEntrySettings) Create single entry within the archive.
CreateEntry(string, Stream, ArchiveEntrySettings, FileSystemInfo) Create single entry within the archive.
CreateEntry(string, string, bool, ArchiveEntrySettings) Create single entry within the archive.
DeleteEntry(ArchiveEntry) Removes the first occurrence of a specific entry from the entries list.
DeleteEntry(int) Removes the entry from the entries list by index.
Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
ExtractToDirectory(string) Extracts all the files in the archive to the directory provided.
Save(Stream, ArchiveSaveOptions) Saves archive to the stream provided.
Save(string, ArchiveSaveOptions) Saves archive to destination file provided.

See Also