Method | Description | |
---|---|---|
Close ( ) : void |
Closes the archive and releases any associated resources.
|
|
CreateInputTarArchive ( Stream inputStream ) : |
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.
|
|
CreateInputTarArchive ( Stream inputStream, int blockFactor ) : |
Create TarArchive for reading setting block factor
|
|
CreateOutputTarArchive ( Stream outputStream ) : |
Create a TarArchive for writing to, using the default blocking factor
|
|
CreateOutputTarArchive ( Stream outputStream, int blockFactor ) : |
Create a
|
|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
|
ExtractContents ( string destinationDirectory ) : void |
Perform the "extract" command and extract the contents of the archive.
|
|
ListContents ( ) : void |
Perform the "list" command for the archive contents. NOTE That this method uses the
|
|
SetKeepOldFiles ( bool keepExistingFiles ) : void |
Set the flag that determines whether existing files are kept, or overwritten during extraction.
|
|
SetUserInfo ( int userId, string userName, int groupId, string groupName ) : void |
Set user and group information that will be used to fill in the tar archive's entry headers. This information is 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. ApplyUserInfoOverrides is set to true by this call.
|
|
WriteEntry ( TarEntry sourceEntry, bool recurse ) : void |
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.
|
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Releases the unmanaged resources used by the FileStream and optionally releases the managed resources.
|
|
OnProgressMessageEvent ( |
Raises the ProgressMessage event
|
|
TarArchive ( ) : System |
Constructor for a default TarArchive.
|
|
TarArchive ( TarInputStream stream ) : System |
Initalise a TarArchive for input.
|
|
TarArchive ( TarOutputStream stream ) : System |
Initialise a TarArchive for output.
|
Method | Description | |
---|---|---|
CloseArchive ( ) : void | ||
EnsureDirectoryExists ( string directoryName ) : void | ||
ExtractEntry ( string destDir, |
Extract an entry from the archive. This method assumes that the tarIn stream has been properly set with a call to GetNextEntry().
|
|
IsBinary ( string filename ) : bool | ||
SetAsciiTranslation ( bool translateAsciiFiles ) : void | ||
WriteEntryCore ( TarEntry sourceEntry, bool recurse ) : void |
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.
|
public static CreateInputTarArchive ( Stream inputStream ) : |
||
inputStream | Stream | The stream to retrieve archive data from. |
return |
public static CreateInputTarArchive ( Stream inputStream, int blockFactor ) : |
||
inputStream | Stream | A stream containing the tar archive contents |
blockFactor | int | The blocking factor to apply |
return |
public static CreateOutputTarArchive ( Stream outputStream ) : |
||
outputStream | Stream | The |
return |
public static CreateOutputTarArchive ( Stream outputStream, int blockFactor ) : |
||
outputStream | Stream | The stream to write to |
blockFactor | int | The blocking factor to use for buffering. |
return |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | true to release both managed and unmanaged resources; /// false to release only unmanaged resources. |
return | void |
public ExtractContents ( string destinationDirectory ) : void | ||
destinationDirectory | string | /// The destination directory into which to extract. /// |
return | void |
protected OnProgressMessageEvent ( |
||
entry | The |
|
message | string | message for this event. Null is no message |
return | void |
public SetKeepOldFiles ( bool keepExistingFiles ) : void | ||
keepExistingFiles | bool | /// If true, do not overwrite existing files. /// |
return | void |
public SetUserInfo ( int userId, string userName, int groupId, string groupName ) : void | ||
userId | int | /// The user id to use in the headers. /// |
userName | string | /// The user name to use in the headers. /// |
groupId | int | /// The group id to use in the headers. /// |
groupName | string | /// The group name to use in the headers. /// |
return | void |
protected TarArchive ( TarInputStream stream ) : System | ||
stream | TarInputStream | The |
return | System |
protected TarArchive ( TarOutputStream stream ) : System | ||
stream | TarOutputStream | The |
return | System |
public WriteEntry ( TarEntry sourceEntry, bool recurse ) : void | ||
sourceEntry | TarEntry | /// The TarEntry representing the entry to write to the archive. /// |
recurse | bool | /// If true, process the children of directory entries. /// |
return | void |