Class Archive

Archive class

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

public class Archive : IArchive

Constructors

NameDescription
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 an entry list can be extracted from the archive.
Archive(string, ArchiveLoadOptions, ArchiveEntrySettings)Initializes a new instance of the Archive class and composes entry list can be extracted from the archive.
Archive(string, string[], ArchiveLoadOptions)Initializes a new instance of the Archive class from multi-volume zip archive and composes an entry list can be extracted from the archive.

Properties

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

Methods

NameDescription
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, Func<Stream>, ArchiveEntrySettings)Create a single entry within the archive.
CreateEntry(string, Stream, ArchiveEntrySettings)Create a single entry within the archive.
CreateEntry(string, FileInfo, bool, ArchiveEntrySettings)Create a single entry within the archive.
CreateEntry(string, Stream, ArchiveEntrySettings, FileSystemInfo)Create a single entry within the archive.
CreateEntry(string, string, bool, ArchiveEntrySettings)Create a single entry within the archive.
DeleteEntry(ArchiveEntry)Removes the first occurrence of the specific entry from the entry list.
DeleteEntry(int)Removes the entry from the entry 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 the destination file provided.
SaveSplit(string, SplitArchiveSaveOptions)Saves multi-volume archive to destination directory provided.

See Also