ExtractSelectedEntries Method (selectionCriteria, directoryPathInArchive)

DotNetZip

Ionic Zip Library v1.9.1.6 ExtractSelectedEntries Method (selectionCriteria, directoryPathInArchive)
ReferenceIonic.ZipZipFileExtractSelectedEntries(String, String)
Selects and Extracts a set of Entries from the ZipFile.
Declaration Syntax
C# Visual Basic Visual C++
public void ExtractSelectedEntries(
	string selectionCriteria,
	string directoryPathInArchive
)
Public Sub ExtractSelectedEntries ( _
	selectionCriteria As String, _
	directoryPathInArchive As String _
)
public:
void ExtractSelectedEntries(
	String^ selectionCriteria, 
	String^ directoryPathInArchive
)
Parameters
selectionCriteria (String)
the selection criteria for entries to extract.
directoryPathInArchive (String)
the directory in the archive from which to select entries. If null, then all directories in the archive are used.
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");
}

Assembly: Ionic.Zip (Module: Ionic.Zip) Version: 1.9.1.8 (1.9.1.8)