C# Class ICSharpCode.SharpZipLib.Zip.FastZip

FastZip provides facilities for creating and extracting zip files.
Afficher le fichier Open project: icsharpcode/SharpZipLib Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

CreateZip() public méthode

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.
Résultat void

CreateZip() public méthode

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.
Résultat void

CreateZip() public méthode

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.
Résultat void

ExtractZip() public méthode

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.
Résultat void

ExtractZip() public méthode

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.
Résultat void

ExtractZip() public méthode

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.
Résultat void

FastZip() public méthode

Initialise a default instance of FastZip.
public FastZip ( ) : System
Résultat System

FastZip() public méthode

Initialise a new instance of FastZip
public FastZip ( FastZipEvents events ) : System
events FastZipEvents The events to use during operations.
Résultat System