FastZip provides facilities for creating and extracting zip files.
More...
|
| | FastZip () |
| | Initialise a default instance of FastZip.
|
| | FastZip (FastZipEvents events) |
| | Initialise a new instance of FastZip
|
| delegate bool | ConfirmOverwriteDelegate (string fileName) |
| | Delegate called when confirming overwriting of files.
|
| void | CreateZip (string zipFileName, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter) |
| | Create a zip file.
|
| void | CreateZip (string zipFileName, string sourceDirectory, bool recurse, string fileFilter) |
| | Create a zip file/archive.
|
| void | CreateZip (Stream outputStream, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter) |
| | Create a zip archive sending output to the outputStream passed.
|
| void | ExtractZip (string zipFileName, string targetDirectory, string fileFilter) |
| | Extract the contents of a zip file.
|
| void | ExtractZip (string zipFileName, string targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, string fileFilter, string directoryFilter, bool restoreDateTime) |
| | Extract the contents of a zip file.
|
| void | ExtractZip (Stream inputStream, string targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, string fileFilter, string directoryFilter, bool restoreDateTime, bool isStreamOwner) |
| | Extract the contents of a zip file held in a stream.
|
FastZip provides facilities for creating and extracting zip files.
◆ Overwrite
Defines the desired handling when overwriting files during extraction.
| Enumerator |
|---|
| Prompt | Prompt the user to confirm overwriting.
|
| Never | Never overwrite files.
|
| Always | Always overwrite files.
|
◆ FastZip() [1/2]
| ICSharpCode.SharpZipLib.Zip.FastZip.FastZip |
( |
| ) |
|
Initialise a default instance of FastZip.
◆ FastZip() [2/2]
| ICSharpCode.SharpZipLib.Zip.FastZip.FastZip |
( |
FastZipEvents | events | ) |
|
Initialise a new instance of FastZip
- Parameters
-
| events | The events to use during operations. |
◆ AddFileContents()
| void ICSharpCode.SharpZipLib.Zip.FastZip.AddFileContents |
( |
string | name, |
|
|
Stream | stream ) |
|
private |
◆ ConfirmOverwriteDelegate()
| delegate bool ICSharpCode.SharpZipLib.Zip.FastZip.ConfirmOverwriteDelegate |
( |
string | fileName | ) |
|
Delegate called when confirming overwriting of files.
◆ CreateZip() [1/3]
| void ICSharpCode.SharpZipLib.Zip.FastZip.CreateZip |
( |
Stream | outputStream, |
|
|
string | sourceDirectory, |
|
|
bool | recurse, |
|
|
string | fileFilter, |
|
|
string | directoryFilter ) |
Create a zip archive sending output to the outputStream passed.
- Parameters
-
| outputStream | The stream to write archive data to. |
| sourceDirectory | The directory to source files from. |
| recurse | True to recurse directories, false for no recursion. |
| fileFilter | The file filter to apply. |
| directoryFilter | The directory filter to apply. |
The outputStream is closed after creation.
◆ CreateZip() [2/3]
| void ICSharpCode.SharpZipLib.Zip.FastZip.CreateZip |
( |
string | zipFileName, |
|
|
string | sourceDirectory, |
|
|
bool | recurse, |
|
|
string | fileFilter ) |
Create a zip file/archive.
- Parameters
-
| zipFileName | The name of the zip file to create. |
| sourceDirectory | The directory to obtain files and directories from. |
| recurse | True to recurse directories, false for no recursion. |
| fileFilter | The file filter to apply. |
◆ CreateZip() [3/3]
| void ICSharpCode.SharpZipLib.Zip.FastZip.CreateZip |
( |
string | zipFileName, |
|
|
string | sourceDirectory, |
|
|
bool | recurse, |
|
|
string | fileFilter, |
|
|
string | directoryFilter ) |
Create a zip file.
- Parameters
-
| zipFileName | The name of the zip file to create. |
| sourceDirectory | The directory to source files from. |
| recurse | True to recurse directories, false for no recursion. |
| fileFilter | The file filter to apply. |
| directoryFilter | The directory filter to apply. |
◆ ExtractEntry()
| void ICSharpCode.SharpZipLib.Zip.FastZip.ExtractEntry |
( |
ZipEntry | entry | ) |
|
|
private |
◆ ExtractFileEntry()
| void ICSharpCode.SharpZipLib.Zip.FastZip.ExtractFileEntry |
( |
ZipEntry | entry, |
|
|
string | targetName ) |
|
private |
◆ ExtractZip() [1/3]
| void ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip |
( |
Stream | inputStream, |
|
|
string | targetDirectory, |
|
|
Overwrite | overwrite, |
|
|
ConfirmOverwriteDelegate | confirmDelegate, |
|
|
string | fileFilter, |
|
|
string | directoryFilter, |
|
|
bool | restoreDateTime, |
|
|
bool | isStreamOwner ) |
Extract the contents of a zip file held in a stream.
- Parameters
-
| inputStream | The seekable input stream containing the zip to extract from. |
| targetDirectory | The directory to save extracted information in. |
| overwrite | The style of overwriting to apply. |
| confirmDelegate | A delegate to invoke when confirming overwriting. |
| fileFilter | A filter to apply to files. |
| directoryFilter | A filter to apply to directories. |
| restoreDateTime | Flag indicating whether to restore the date and time for extracted files. |
| isStreamOwner | Flag indicating whether the inputStream will be closed by this method. |
◆ ExtractZip() [2/3]
| void ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip |
( |
string | zipFileName, |
|
|
string | targetDirectory, |
|
|
Overwrite | overwrite, |
|
|
ConfirmOverwriteDelegate | confirmDelegate, |
|
|
string | fileFilter, |
|
|
string | directoryFilter, |
|
|
bool | restoreDateTime ) |
Extract the contents of a zip file.
- Parameters
-
| zipFileName | The zip file to extract from. |
| targetDirectory | The directory to save extracted information in. |
| overwrite | The style of overwriting to apply. |
| confirmDelegate | A delegate to invoke when confirming overwriting. |
| fileFilter | A filter to apply to files. |
| directoryFilter | A filter to apply to directories. |
| restoreDateTime | Flag indicating whether to restore the date and time for extracted files. |
◆ ExtractZip() [3/3]
| void ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip |
( |
string | zipFileName, |
|
|
string | targetDirectory, |
|
|
string | fileFilter ) |
Extract the contents of a zip file.
- Parameters
-
| zipFileName | The zip file to extract from. |
| targetDirectory | The directory to save extracted information in. |
| fileFilter | A filter to apply to files. |
◆ MakeExternalAttributes()
| int ICSharpCode.SharpZipLib.Zip.FastZip.MakeExternalAttributes |
( |
FileInfo | info | ) |
|
|
staticprivate |
◆ NameIsValid()
| bool ICSharpCode.SharpZipLib.Zip.FastZip.NameIsValid |
( |
string | name | ) |
|
|
staticprivate |
◆ ProcessDirectory()
| void ICSharpCode.SharpZipLib.Zip.FastZip.ProcessDirectory |
( |
object | sender, |
|
|
DirectoryEventArgs | e ) |
|
private |
◆ ProcessFile()
| void ICSharpCode.SharpZipLib.Zip.FastZip.ProcessFile |
( |
object | sender, |
|
|
ScanEventArgs | e ) |
|
private |
◆ buffer_
| byte [] ICSharpCode.SharpZipLib.Zip.FastZip.buffer_ |
|
private |
◆ confirmDelegate_
◆ continueRunning_
| bool ICSharpCode.SharpZipLib.Zip.FastZip.continueRunning_ |
|
private |
◆ createEmptyDirectories_
| bool ICSharpCode.SharpZipLib.Zip.FastZip.createEmptyDirectories_ |
|
private |
◆ directoryFilter_
| NameFilter ICSharpCode.SharpZipLib.Zip.FastZip.directoryFilter_ |
|
private |
◆ entryFactory_
◆ events_
◆ extractNameTransform_
| INameTransform ICSharpCode.SharpZipLib.Zip.FastZip.extractNameTransform_ |
|
private |
◆ fileFilter_
| NameFilter ICSharpCode.SharpZipLib.Zip.FastZip.fileFilter_ |
|
private |
◆ outputStream_
◆ overwrite_
| Overwrite ICSharpCode.SharpZipLib.Zip.FastZip.overwrite_ |
|
private |
◆ password_
| string ICSharpCode.SharpZipLib.Zip.FastZip.password_ |
|
private |
◆ restoreAttributesOnExtract_
| bool ICSharpCode.SharpZipLib.Zip.FastZip.restoreAttributesOnExtract_ |
|
private |
◆ restoreDateTimeOnExtract_
| bool ICSharpCode.SharpZipLib.Zip.FastZip.restoreDateTimeOnExtract_ |
|
private |
◆ sourceDirectory_
| string ICSharpCode.SharpZipLib.Zip.FastZip.sourceDirectory_ |
|
private |
◆ useZip64_
◆ zipFile_
| ZipFile ICSharpCode.SharpZipLib.Zip.FastZip.zipFile_ |
|
private |
◆ CreateEmptyDirectories
| bool ICSharpCode.SharpZipLib.Zip.FastZip.CreateEmptyDirectories |
|
getset |
Get/set a value indicating wether empty directories should be created.
◆ EntryFactory
◆ NameTransform
◆ Password
| string ICSharpCode.SharpZipLib.Zip.FastZip.Password |
|
getset |
Get / set the password value.
◆ RestoreAttributesOnExtract
| bool ICSharpCode.SharpZipLib.Zip.FastZip.RestoreAttributesOnExtract |
|
getset |
Get/set a value indicating wether file attributes should be restored during extract operations.
◆ RestoreDateTimeOnExtract
| bool ICSharpCode.SharpZipLib.Zip.FastZip.RestoreDateTimeOnExtract |
|
getset |
Get/set a value indicating wether file dates and times should be restored when extracting files from an archive.
The default value is false.
◆ UseZip64
| UseZip64 ICSharpCode.SharpZipLib.Zip.FastZip.UseZip64 |
|
getset |
Gets or sets the setting for Zip64 handling when writing.
The default value is dynamic which is not backwards compatible with old programs and can cause problems with XP's built in compression which cant read Zip64 archives. However it does avoid the situation were a large file is added and cannot be completed correctly. NOTE: Setting the size for entries before they are added is the best solution! By default the EntryFactory used by FastZip will set fhe file size.
The documentation for this class was generated from the following file: