Ionic Zip Library v1.9.1.6
ExtractSelectedEntries Method (selectionCriteria, extractExistingFile)
Selects and Extracts a set of Entries from the ZipFile.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public void ExtractSelectedEntries( string selectionCriteria, ExtractExistingFileAction extractExistingFile )
Public Sub ExtractSelectedEntries ( _ selectionCriteria As String, _ extractExistingFile As ExtractExistingFileAction _ )
public: void ExtractSelectedEntries( String^ selectionCriteria, ExtractExistingFileAction extractExistingFile )
Parameters
- selectionCriteria (String)
- the selection criteria for entries to extract.
- extractExistingFile (ExtractExistingFileAction)
- The action to take if extraction would overwrite an existing file.
Remarks
The entries are extracted into the current working directory. When extraction would would overwrite an existing filesystem file, the action taken is as specified in the extractExistingFile parameter.
For information on the syntax of the string describing the entry selection criteria, see AddSelectedFiles(String).
Examples
This example shows how extract all XML files modified after 15 January 2009,
overwriting any existing files.
CopyC#
using (ZipFile zip = ZipFile.Read(zipArchiveName)) { zip.ExtractSelectedEntries("name = *.xml and mtime > 2009-01-15", ExtractExistingFileAction.OverwriteSilently); }