C# Класс ICSharpCode.SharpZipLib.Zip.FastZip

FastZip provides facilities for creating and extracting zip files.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateZip ( Stream outputStream, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter ) : void

Create a zip archive sending output to the outputStream passed.

The outputStream is closed after creation.

CreateZip ( string zipFileName, string sourceDirectory, bool recurse, string fileFilter ) : void

Create a zip file/archive.

CreateZip ( string zipFileName, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter ) : void

Create a zip file.

ExtractZip ( Stream inputStream, string targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, string fileFilter, string directoryFilter, bool restoreDateTime, bool isStreamOwner ) : void

Extract the contents of a zip file held in a stream.

ExtractZip ( string zipFileName, string targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, string fileFilter, string directoryFilter, bool restoreDateTime ) : void

Extract the contents of a zip file.

ExtractZip ( string zipFileName, string targetDirectory, string fileFilter ) : void

Extract the contents of a zip file.

FastZip ( ) : System

Initialise a default instance of FastZip.

FastZip ( FastZipEvents events ) : System

Initialise a new instance of FastZip

Приватные методы

Метод Описание
AddFileContents ( string name, Stream stream ) : void
ExtractEntry ( ZipEntry entry ) : void
ExtractFileEntry ( ZipEntry entry, string targetName ) : void
MakeExternalAttributes ( FileInfo info ) : int
NameIsValid ( string name ) : bool
ProcessDirectory ( object sender, DirectoryEventArgs e ) : void
ProcessFile ( object sender, ScanEventArgs e ) : void

Описание методов

CreateZip() публичный Метод

Create a zip archive sending output to the outputStream passed.
The outputStream is closed after creation.
public CreateZip ( Stream outputStream, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter ) : void
outputStream Stream The stream to write archive data to.
sourceDirectory string The directory to source files from.
recurse bool True to recurse directories, false for no recursion.
fileFilter string The file filter to apply.
directoryFilter string The directory filter to apply.
Результат void

CreateZip() публичный Метод

Create a zip file/archive.
public CreateZip ( string zipFileName, string sourceDirectory, bool recurse, string fileFilter ) : void
zipFileName string The name of the zip file to create.
sourceDirectory string The directory to obtain files and directories from.
recurse bool True to recurse directories, false for no recursion.
fileFilter string The file filter to apply.
Результат void

CreateZip() публичный Метод

Create a zip file.
public CreateZip ( string zipFileName, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter ) : void
zipFileName string The name of the zip file to create.
sourceDirectory string The directory to source files from.
recurse bool True to recurse directories, false for no recursion.
fileFilter string The file filter to apply.
directoryFilter string The directory filter to apply.
Результат void

ExtractZip() публичный Метод

Extract the contents of a zip file held in a stream.
public ExtractZip ( Stream inputStream, string targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, string fileFilter, string directoryFilter, bool restoreDateTime, bool isStreamOwner ) : void
inputStream Stream The seekable input stream containing the zip to extract from.
targetDirectory string The directory to save extracted information in.
overwrite Overwrite The style of overwriting to apply.
confirmDelegate ConfirmOverwriteDelegate A delegate to invoke when confirming overwriting.
fileFilter string A filter to apply to files.
directoryFilter string A filter to apply to directories.
restoreDateTime bool Flag indicating whether to restore the date and time for extracted files.
isStreamOwner bool Flag indicating whether the inputStream will be closed by this method.
Результат void

ExtractZip() публичный Метод

Extract the contents of a zip file.
public ExtractZip ( string zipFileName, string targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, string fileFilter, string directoryFilter, bool restoreDateTime ) : void
zipFileName string The zip file to extract from.
targetDirectory string The directory to save extracted information in.
overwrite Overwrite The style of overwriting to apply.
confirmDelegate ConfirmOverwriteDelegate A delegate to invoke when confirming overwriting.
fileFilter string A filter to apply to files.
directoryFilter string A filter to apply to directories.
restoreDateTime bool Flag indicating whether to restore the date and time for extracted files.
Результат void

ExtractZip() публичный Метод

Extract the contents of a zip file.
public ExtractZip ( string zipFileName, string targetDirectory, string fileFilter ) : void
zipFileName string The zip file to extract from.
targetDirectory string The directory to save extracted information in.
fileFilter string A filter to apply to files.
Результат void

FastZip() публичный Метод

Initialise a default instance of FastZip.
public FastZip ( ) : System
Результат System

FastZip() публичный Метод

Initialise a new instance of FastZip
public FastZip ( FastZipEvents events ) : System
events FastZipEvents The events to use during operations.
Результат System