Ionic Zip Library v1.9.1.6
ExtractSelectedEntries Method (selectionCriteria, directoryPathInArchive)
Selects and Extracts a set of Entries from the ZipFile.
Declaration Syntax
C# | Visual Basic | Visual C++ |
Remarks
The entries are selected from the specified directory within the archive, and then extracted into the current working directory.
If any of the files to be extracted already exist, then the action taken is as specified in the ExtractExistingFile property on the corresponding ZipEntry instance. By default, the action taken in this case is to throw an exception.
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,
and writes them to the "unpack" directory.
CopyC#
using (ZipFile zip = ZipFile.Read(zipArchiveName)) { zip.ExtractSelectedEntries("name = *.xml and mtime > 2009-01-15","unpack"); }