Ionic Zip Library v1.9.1.6
ExtractExistingFileAction Enumeration
An enum for the options when extracting an entry would overwrite an existing file.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public enum ExtractExistingFileAction
Public Enumeration ExtractExistingFileAction
public enum class ExtractExistingFileAction
Members
Member | Description |
---|---|
Throw |
Throw an exception when extraction would overwrite an existing file. (For
COM clients, this is a 0 (zero).)
|
OverwriteSilently |
When extraction would overwrite an existing file, overwrite the file silently.
The overwrite will happen even if the target file is marked as read-only.
(For COM clients, this is a 1.)
|
DoNotOverwrite |
When extraction would overwrite an existing file, don't overwrite the file, silently.
(For COM clients, this is a 2.)
|
InvokeExtractProgressEvent |
When extraction would overwrite an existing file, invoke the ExtractProgress
event, using an event type of Extracting_ExtractEntryWouldOverwrite. In
this way, the application can decide, just-in-time, whether to overwrite the
file. For example, a GUI application may wish to pop up a dialog to allow
the user to choose. You may want to examine the ExtractLocation property before making
the decision. If, after your processing in the Extract progress event, you
want to NOT extract the file, set ExtractExistingFile
on the ZipProgressEventArgs.CurrentEntry to DoNotOverwrite.
If you do want to extract the file, set ZipEntry.ExtractExistingFile
to OverwriteSilently. If you want to cancel the Extraction, set
ZipProgressEventArgs.Cancel to true. Cancelling differs from using
DoNotOverwrite in that a cancel will not extract any further entries, if
there are any. (For COM clients, the value of this enum is a 3.)
|
Remarks
This enum describes the actions that the library can take when an Extract() or ExtractWithPassword() method is called to extract an entry to a filesystem, and the extraction would overwrite an existing filesystem file.