| NAnt  Help  Task Reference  <tar> | v0.85 | 
Creates a tar file from the specified filesets.
Uses #ziplib (SharpZipLib), an open source Tar/Zip/GZip library written entirely in C#.
| Attribute | Type | Description | Required | 
|---|---|---|---|
| destfile | file | The tar file to create. | True | 
| compression | TarCompressionMethod | The compression method. The default is None. | False | 
| includeemptydirs | bool | Include empty directories in the generated tar file. The default is false. | False | 
| failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False | 
| if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False | 
| unless | bool | Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. | False | 
| verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False | 
 Tar all files in ${build.dir} and ${doc.dir} into a file called "backup.tar.gz", and apply gzip compression to it. 
<tar destfile="backup.tar.gz" compression="GZip">
    <fileset basedir="${bin.dir}" prefix="bin">
        <include name="**/*" />
    </fileset>
    <fileset basedir="${doc.dir}" prefix="doc">
        <include name="**/*" />
    </fileset>
</tar>