PowerTCP Zip Compression for .NET
Open(String) Method
Example 




The name of the compressed file to be opened.
Opens a compressed archive and populates the collection to reflect the items in the compressed archive.
Syntax
<DescriptionAttribute("To load the given zip archive file to the collection for further manipulation.")>
Public Overloads Sub Open( _
   ByVal zipArchive As String _
) 
Dim instance As Archive
Dim zipArchive As String
 
instance.Open(zipArchive)
[Description("To load the given zip archive file to the collection for further manipulation.")]
public void Open( 
   string zipArchive
)
[Description("To load the given zip archive file to the collection for further manipulation.")]
public: void Open( 
   string* zipArchive
) 
[Description("To load the given zip archive file to the collection for further manipulation.")]
public:
void Open( 
   String^ zipArchive
) 

Parameters

zipArchive
The name of the compressed file to be opened.
Remarks

This overload is intended to open compressed files and populate the Archive collection.

Please note that an Open operation will clear any pre-existing items in the collection. Also, the zipArchive specified in the open method will be locked as read-only until the Archive.Clear method is called.

Example
The following example demonstrates loading a compressed file and unzipping the file.
' 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");
See Also

Reference

Archive Class
Archive Members
Overload List


PowerTCP Zip for .NET Documentation Version 2.1.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic