BenSelect Documentation
ExtractZip Method
See Also  Send Feedback
Selerix.Foundation Namespace > Compression Class : ExtractZip Method
zipFilePath
The path to the Zip file to extract.
targetDir
Merge the entries from the archive with entries in the target folder. Overwrite existing entries in the target folder. The full path to the destination folder.

If targetDir does not exist, a new folder will be created.

If targetDir is not empty and "merge" flag is false, System.ArgumentException will be thrown.

merge
Merge the entries from the archive with entries in the target folder.
rewrite
Overwrite existing entries in the target folder.
Extracts all Zip Archive entries into the target folder.

Syntax

JScript 
public static function ExtractZip( 
   zipFilePath : String,
   targetDir : String,
   merge : boolean,
   rewrite : boolean
) : int;

Parameters

zipFilePath
The path to the Zip file to extract.
targetDir
Merge the entries from the archive with entries in the target folder. Overwrite existing entries in the target folder. The full path to the destination folder.

If targetDir does not exist, a new folder will be created.

If targetDir is not empty and "merge" flag is false, System.ArgumentException will be thrown.

merge
Merge the entries from the archive with entries in the target folder.
rewrite
Overwrite existing entries in the target folder.

Return Value

A count of extracted files.

Exceptions

ExceptionDescription
System.ArgumentExceptionZip file doesn't exist or destination folder is not empty and "merge" flag is false.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2024 All Rights Reserved.