Summary
Extracts files from a zip archive.
- Assembly
- NAnt
.Compression .dll - Namespace
- NAnt
.Compression .Tasks - Base Types
-
- Task
- ExpandBaseTask
graph BT
Type-->Base0["ExpandBaseTask"]
click Base0 "/api/NAnt.Compression.Tasks/ExpandBaseTask"
Base0-->Base1["Task"]
Type["UnZipTask"]
class Type type-node
Syntax
[TaskName("unzip")]
public class UnZipTask : ExpandBaseTask
Examples
Extracts all the file from the zip, preserving the directory structure.
<unzip zipfile="backup.zip"/>
Remarks
Uses #ziplib (SharpZipLib), an open source Zip/GZip library written entirely in C#.
Attributes
Type | Description |
---|---|
TaskName |
Properties
Name | Value | Summary |
---|---|---|
Encoding | Encoding |
The character encoding that has been used for filenames inside the
zip file. The default is the system's OEM code page.
|
Overwrite | bool |
Overwrite files, even if they are newer than the corresponding
entries in the archive. The default is
true .
Inherited from ExpandBaseTask
|
PassWord | string |
The password that protect the Zip
|
ToDirectory | DirectoryInfo |
The directory where the expanded files should be stored. The
default is the project base directory.
|
ZipFile | FileInfo |
The archive file to expand.
|
Methods
Name | Value | Summary |
---|---|---|
ExecuteTask |
void |
Extracts the files from the zip file.
|
ExtractDirectory |
void |
Extracts a directory entry from the specified stream.
Inherited from ExpandBaseTask
|
ExtractFile |
void |
Extracts a file entry from the specified stream.
Inherited from ExpandBaseTask
|