This topic briefly presents some of the simpler overloads of the static methods of the QuickTar class; for a complete list, see the class's methods in the reference documentation. Also, see the appropriate topics under Task-Based Help for more complete examples.
Tar is not currently available in Xceed's Compact Framework products.
Only the simpler overloads are presented here. Other overloads let you specify whether existing files should be replaced, whether sub-folders should be scanned recursively, whether paths should be preserved, whether the resulting Tar archive should be compressed using GZip, as well as use events.
The Tar method lets you place items into a tar archive. The following recursively adds files named "test.txt" to a Tar archive named "test.tar".
VB.NET | ![]() |
---|---|
QuickTar.Tar("d:\test.tar", "d:\test\test.txt") |
C# | ![]() |
---|---|
QuickTar.Tar(@"d:\test.tar", @"d:\test\test.txt"); |
The UnTar method lets you extact files from a Tar archive.
VB.NET | ![]() |
---|---|
QuickTar.Untar("d:\test.tar", "d:\", False, "\test\test.txt") |
C# | ![]() |
---|---|
QuickTar.Untar(@"d:\test.tar", @"d:\", false, @"\test\test.txt"); |
The GetTarContents method returns a list of QuickTarItem objects.
VB.NET | ![]() |
---|---|
Dim items As QuickTarItem() = QuickTar.GetTarContents("d:\test.tar", False, "*") |
C# | ![]() |
---|---|
QuickTarItem[] items = QuickTar.GetTarContents(@"d:\test.tar", false, "*"); |
Finally, the Remove method removes items from a Tar archive.
VB.NET | ![]() |
---|---|
QuickTar.Remove("d:\test.tar", True, "\test\test.txt") |
C# | ![]() |
---|---|
QuickTar.Remove(@"d:\test.tar", true, @"\test\test.txt"); |
Overloads which do not have a recursive parameter automatically perform their operation recursively.