SevenZipArchive

SevenZipArchive class

This class represents 7z archive file. Use it to compose and extract 7z archives.

public class SevenZipArchive : IDisposable

Constructors

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

Properties

Name Description
Entries { get; } Gets entries of SevenZipArchiveEntry type constituting the archive.
NewEntrySettings { get; } Compression and encryption settings used for newly added SevenZipArchiveEntry 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, SevenZipEntrySettings) Create single entry within the archive.
CreateEntry(string, FileInfo, bool, SevenZipEntrySettings) Create single entry within the archive.
CreateEntry(string, Stream, SevenZipEntrySettings, FileSystemInfo) Create single entry within the archive.
CreateEntry(string, string, bool, SevenZipEntrySettings) Create single entry within the archive.
Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
ExtractToDirectory(string, string) Extracts all the files in the archive to the directory provided.
Save(Stream) Saves 7z archive to the stream provided.
Save(string) Saves archive to destination file provided.

See Also