NAnt SDK Documentation - v0.85-nightly-2005-11-09

TarTask Class

[This is preliminary documentation and subject to change.]

Creates a tar file from the specified filesets.

For a list of all members of this type, see TarTask Members.

System.Object
   NAnt.Core.Element
      NAnt.Core.Task
         NAnt.Compression.Tasks.TarTask

[Visual Basic]
<TaskName(Name:="tar")>
Public Class TarTask
    Inherits Task
[C#]
[TaskName(Name="tar")]
public class TarTask : Task

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Uses #ziplib (SharpZipLib), an open source Tar/Zip/GZip library written entirely in C#.

Example

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>
                
              

Requirements

Namespace: NAnt.Compression.Tasks

Assembly: NAnt.CompressionTasks (in NAnt.CompressionTasks.dll)

See Also

TarTask Members | NAnt.Compression.Tasks Namespace