Dart.PowerTCP.Zip Namespace > Archive Class : Unzip Method |
<DescriptionAttribute("To decompress the items in the current collection to a destination directory")> Public Sub Unzip( _ ByVal destination As String _ )
[Description("To decompress the items in the current collection to a destination directory")] public void Unzip( string destination )
[Description("To decompress the items in the current collection to a destination directory")] public: void Unzip( string* destination )
[Description("To decompress the items in the current collection to a destination directory")] public: void Unzip( String^ destination )
Exception | Description |
---|---|
ZipException | A critical zip operation error occurred during this activity. Please see ZipException.Message for details. |
The PreservePath property determines whether to preserve the paths and the Archive.Overwrite property determines whether and how an existing file will be overwritten. By default, the paths will not be preserved and the overwrite choice is Overwrite.Never. The Archive.Password property is used for decrypting the encrypted items.
If you would like to unzip an item to a stream, ArchiveItem.Unzip can be used for such a purpose.
If an error occurs for an individual item during this operation, the Archive.Exception Event will be raised.
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Zip" ' at the top of your class. ' Open a compressed stream. This populates the Archive collection. Archive1.Open("c:\test.zip") ' Preserve the path structure and overwrite any existing files. Archive1.PreservePath = True Archive1.Overwrite = Overwrite.Always ' Unzip to c:\test Archive1.Unzip("c:\Test")
// Be sure to import the namespace by putting "using Dart.PowerTCP.Zip;" // at the top of your class. // Open a compressed stream. This populates the Archive collection. archive1.Open("c:\\test.zip"); // Preserve the path structure and overwrite any existing files. archive1.PreservePath = true; archive1.Overwrite = Overwrite.Always; // Unzip to c:\test archive1.Unzip("c:\\Test");