Class TarArchive

TarArchive class

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

public class TarArchive : IArchive

Constructors

NameDescription
TarArchive()Initializes a new instance of the TarArchive class.
TarArchive(Stream)Initializes a new instance of the Archive class and composes entries list can be extracted from the archive.
TarArchive(string)Initializes a new instance of the TarArchive class and composes entries list can be extracted from the archive.

Properties

NameDescription
Entries { get; }Gets entries of TarEntry type constituting the archive.

Methods

NameDescription
static FromGZip(Stream)Extracts supplied gzip archive and composes TarArchive from extracted data.
static FromGZip(string)Extracts supplied gzip archive and composes TarArchive from extracted data.
static FromLZip(Stream)Extracts supplied lzip archive and composes TarArchive from extracted data.
static FromLZip(string)Extracts supplied lzip archive and composes TarArchive from extracted data.
static FromLZMA(Stream)Extracts supplied LZMA archive and composes TarArchive from extracted data.
static FromLZMA(string)Extracts supplied LZMA archive and composes TarArchive from extracted data.
static FromXz(Stream)Extracts supplied xz format archive and composes TarArchive from extracted data.
static FromXz(string)Extracts supplied xz format archive and composes TarArchive from extracted data.
static FromZ(Stream)Extracts supplied Z format archive and composes TarArchive from extracted data.
static FromZ(string)Extracts supplied Z format archive and composes TarArchive from extracted data.
static FromZstandard(Stream)Extracts supplied Zstandard archive and composes TarArchive from extracted data.
static FromZstandard(string)Extracts supplied Zstandard archive and composes TarArchive from extracted data.
CreateEntries(DirectoryInfo, bool)Adds to the archive all the files and directories recursively in the directory given.
CreateEntries(string, bool)Adds to the archive all the files and directories recursively in the directory given.
CreateEntry(string, FileInfo, bool)Create single entry within the archive.
CreateEntry(string, Stream, FileSystemInfo)Create single entry within the archive.
CreateEntry(string, string, bool)Create single entry within the archive.
DeleteEntry(int)Removes the entry from the entries list by index.
DeleteEntry(TarEntry)Removes the first occurrence of a specific entry from the entries list.
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, TarFormat?)Saves archive to the stream provided.
Save(string, TarFormat?)Saves archive to destination file provided.
SaveGzipped(Stream, TarFormat?)Saves archive to the stream with gzip compression.
SaveGzipped(string, TarFormat?)Saves archive to the file by path with gzip compression.
SaveLzipped(Stream, TarFormat?)Saves archive to the stream with lzip compression.
SaveLzipped(string, TarFormat?)Saves archive to the file by path with lzip compression.
SaveLZMACompressed(Stream, TarFormat?)Saves archive to the stream with LZMA compression.
SaveLZMACompressed(string, TarFormat?)Saves archive to the file by path with lzma compression.
SaveXzCompressed(Stream, TarFormat?, XzArchiveSettings)Saves archive to the stream with xz compression.
SaveXzCompressed(string, TarFormat?, XzArchiveSettings)Saves archive to the path by path with xz compression.
SaveZCompressed(Stream, TarFormat?)Saves archive to the stream with Z compression.
SaveZCompressed(string, TarFormat?)Saves archive to the path by path with Z compression.
SaveZstandard(Stream, TarFormat?)Saves archive to the stream with Zstandard compression.
SaveZstandard(string, TarFormat?)Saves archive to the file by path with Zstandard compression.

See Also