C# Class LitDev.LDZip

Afficher le fichier Open project: litdev1/LitDev

Méthodes publiques

Méthode Description
Remove ( Primitive zipFile, Primitive files ) : Primitive

Remove a file (or directory with all sub files) from an existing zip archive.

UnZip ( Primitive zipFile, Primitive directory ) : Primitive

Uncompress a zip archive.

Zip ( Primitive zipFile, Primitive files ) : Primitive

Compress files to a zip archive.

ZipList ( Primitive zipFile ) : Primitive

List the files in a zip archive.

Private Methods

Méthode Description
AddToArchive ( Package zip, string fileToAdd, string root ) : void
ExtractFile ( string rootFolder, System.IO.Packaging.ZipPackagePart contentFile ) : void
RemoveFromArchive ( ZipFile zip, string fileToRemove ) : void

Method Details

Remove() public static méthode

Remove a file (or directory with all sub files) from an existing zip archive.
public static Remove ( Primitive zipFile, Primitive files ) : Primitive
zipFile Primitive The zip archive to remove a file from.
files Primitive /// An array of files to remove from the zip archive. /// A single file or directory may also be deleted. /// Any directories will be recursively removed from the zip. ///
Résultat Primitive

UnZip() public static méthode

Uncompress a zip archive.
public static UnZip ( Primitive zipFile, Primitive directory ) : Primitive
zipFile Primitive The zip archive to uncompress.
directory Primitive A directory to uncompress the files to (existing files will be overwritten).
Résultat Primitive

Zip() public static méthode

Compress files to a zip archive.
public static Zip ( Primitive zipFile, Primitive files ) : Primitive
zipFile Primitive The zip archive file to create.
files Primitive /// An array of files to append to the zip archive. /// A single file or directory may also be set. /// Any directories will be recursively added to the zip. /// Any white space in files or directories will be replaced with "_". ///
Résultat Primitive

ZipList() public static méthode

List the files in a zip archive.
public static ZipList ( Primitive zipFile ) : Primitive
zipFile Primitive The zip archive.
Résultat Primitive