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.gz Archive VB.NET example code to decompress and untar a .tar.gz archive. ' Untar a .tar.gz archive.
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
' The Chilkat.Gzip class is included with the "Chilkat Zip" license.
Dim gz As New Chilkat.Gzip()
gz.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 = gz.UnTarGz("myProduct.tar.gz", untarRoot, bNoAbsolute)
If (Not success) Then
MessageBox.Show(gz.LastErrorText)
End If
End Sub
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.