TarArchive Methods

SharpZip Compression Library

SharpZip Compression Library

TarArchive Methods

The methods of the TarArchive class are listed below. For a complete list of TarArchive class members, see the TarArchive Members topic.

Public Static Methods

CreateInputTarArchiveOverloaded. The InputStream based constructors create a TarArchive for the purposes of extracting or listing a tar archive. Thus, use these constructors when you wish to extract files from or list the contents of an existing tar archive.
CreateOutputTarArchiveOverloaded. Create a TarArchive for writing to, using the default blocking factor

Public Instance Methods

CloseArchive Close the archive. This simply calls the underlying tar stream's close() method.
Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
ExtractContents Perform the "extract" command and extract the contents of the archive.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) Gets the Type of the current instance.
ListContents Perform the "list" command for the archive contents. NOTE That this method uses the progress event to actually list the contents. If the progress display event is not set, nothing will be listed!
SetAsciiTranslation Set the ascii file translation flag. If ascii file translation is true, then the file is checked to see if it a binary file or not. If the flag is true and the test indicates it is ascii text file, it will be translated. The translation converts the local operating system's concept of line ends into the UNIX line end, '\n', which is the defacto standard for a TAR archive. This makes text files compatible with UNIX.
SetKeepOldFiles Set the flag that determines whether existing files are kept, or overwritten during extraction.
SetUserInfo Set user and group information that will be used to fill in the tar archive's entry headers. This information based on that available for the linux operating system, which is not always available on other operating systems. TarArchive allows the programmer to specify values to be used in their place.
ToString (inherited from Object) Returns a String that represents the current Object.
WriteEntry Write an entry to the archive. This method will call the putNextEntry and then write the contents of the entry, and finally call closeEntry() for entries that are files. For directories, it will call putNextEntry(), and then, if the recurse flag is true, process each entry that is a child of the directory.

Protected Instance Methods

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
OnProgressMessageEvent Raises the ProgressMessage event

See Also

TarArchive Class | ICSharpCode.SharpZipLib.Tar Namespace