TarArchive

TarArchive class

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

public class TarArchive : IDisposable

Constructors

Name Description
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

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

Methods

Name Description
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 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.
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.
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.

See Also