This topic demonstrates how to remove items from a Tar archive using the static Remove method of the QuickTar class.
Tar is not currently available in Xceed's Compact Framework products.
There is only one version of the Remove method.
In the following example, we specify the Tar archive and the files to remove, and we indicate that the Remove operation should be performed recursively.
VB.NET | Copy Code |
---|---|
QuickTar.Remove("d:\test.tar", True, "*old*") |
C# | Copy Code |
---|---|
QuickTar.Remove(@"d:\test.tar", true, "*old*"); |
Note that the filesToRemove parameter of the Remove method cannot be null otherwise an ArgumentNullException exception will be thrown.
The main questions you should ask yourself when adding items to a Tar archive are:
Do you want to do more complex Tar operations? Use the FileSystem-based classes defined within the Xceed.Tar namespace.