Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Untar a .tar.Z Compressed TAR Archive VB.NET example code to decompress and untar a .tar.Z archive. ' Untar a .tar.Z compressed tar archive.
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
' The Chilkat.UnixCompress class is included with the "Chilkat Zip" license.
Dim z As New Chilkat.UnixCompress()
z.UnlockComponent("anything for 30-day trial")
Dim bNoAbsolute As Boolean
Dim untarRoot As String
' bNoAbsolute controls whether leading '/' or '\' are automatically
' removed from filepaths to ensure that all files are untarred to
' a directory beneath the untarRoot.
bNoAbsolute = True
untarRoot = "c:/temp/myProduct"
' The UnTarZ method is streaming. Files of any size
' may be uncompressed and untarred. No temporary files are produced.
Dim success As Boolean
success = z.UnTarZ("myProduct.tar.Z", untarRoot, bNoAbsolute)
If (Not success) Then
MessageBox.Show(z.LastErrorText)
End If
End Sub
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.