Xceed .NET Libraries Documentation
Xceed.Tar Assembly / Xceed.Tar Namespace / QuickTar Class / Untar Method / Untar(String,String,Boolean,Boolean,ByteProgressionCallback,ItemProgressionCallback,Object) Method
The full path of the Tar archive. Cannot be empty.
The path to the destination folder in which to untar all items. Cannot be empty.
Boolean value indicating whether existing items in the destination should be replaced.
Boolean value indicating if the tar file was compressed using GZip. Note: The GZip file retrieved must have the following format: tarFileName.gz. An exception is thrown if the Tar archive is not compressed.
Delegate for ByteProgression notification.
Delegate for ItemProgression notification.
Opaque data that will be passed back to the event handler when an event is raised.


In This Topic
    Untar(String,String,Boolean,Boolean,ByteProgressionCallback,ItemProgressionCallback,Object) Method
    In This Topic
    Extracts files from a Tar archive to a destination folder, using the provided progression notification delegates, specifying whether existing files should be replaced and whether the Tar archive is compressed with GZip.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Sub Untar( _
       ByVal tarFileName As String, _
       ByVal destinationFolder As String, _
       ByVal replaceExistingFiles As Boolean, _
       ByVal isTarCompressed As Boolean, _
       ByVal byteProgressionCallback As QuickTar.ByteProgressionCallback, _
       ByVal itemProgressionCallback As QuickTar.ItemProgressionCallback, _
       ByVal userParams As Object _
    ) 
    'Usage
     
    
    Dim tarFileName As String
    Dim destinationFolder As String
    Dim replaceExistingFiles As Boolean
    Dim isTarCompressed As Boolean
    Dim byteProgressionCallback As QuickTar.ByteProgressionCallback
    Dim itemProgressionCallback As QuickTar.ItemProgressionCallback
    Dim userParams As Object
     
    QuickTar.Untar(tarFileName, destinationFolder, replaceExistingFiles, isTarCompressed, byteProgressionCallback, itemProgressionCallback, userParams)

    Parameters

    tarFileName
    The full path of the Tar archive. Cannot be empty.
    destinationFolder
    The path to the destination folder in which to untar all items. Cannot be empty.
    replaceExistingFiles
    Boolean value indicating whether existing items in the destination should be replaced.
    isTarCompressed
    Boolean value indicating if the tar file was compressed using GZip. Note: The GZip file retrieved must have the following format: tarFileName.gz. An exception is thrown if the Tar archive is not compressed.
    byteProgressionCallback
    Delegate for ByteProgression notification.
    itemProgressionCallback
    Delegate for ItemProgression notification.
    userParams
    Opaque data that will be passed back to the event handler when an event is raised.
    Remarks
    This flavor of UnTar() uses the StreamingTar class to perform the extraction. As a result, extraction time is much lower than when using the other flavors. Time gains between 40-55% are typical. The directory structure is always preserved in the destination folder. All files and folder are extracted recursively. In the event handlers, abort is not supported, the current item name is not provided and the progression totals are not calculated.
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Standard: netstandard2.0, netstandard2.1

    .NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also