UnTarTask Class

Summary

Extracts files from a tar archive.
Assembly
NAnt.Compression.dll
Namespace
NAnt.Compression.Tasks
Base Types
graph BT Type-->Base0["ExpandBaseTask"] click Base0 "/api/NAnt.Compression.Tasks/ExpandBaseTask" Base0-->Base1["Task"] Type["UnTarTask"] class Type type-node

Syntax

[TaskName("untar")]
public class UnTarTask : ExpandBaseTask

Examples

Extracts all files from a gzipped tar, preserving the directory structure.

<untar src="nant-bin.tar.gz" dest="bin" compression="gzip" />

Remarks

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

Attributes

Type Description
TaskName

Properties

Name Value Summary
CompressionMethod TarCompressionMethod
The compression method. The default is NAnt.Compression.Types.TarCompressionMethod.None.
DestinationDirectory DirectoryInfo
The directory where to store the expanded file(s). The default is the project base directory.
Overwrite bool
Overwrite files, even if they are newer than the corresponding entries in the archive. The default is true.
Inherited from ExpandBaseTask
SrcFile FileInfo
The archive file to expand.

Methods

Name Value Summary
ExecuteTask() void
Extracts the files from the archive.
ExtractDirectory(Stream, string, string, DateTime) void
Extracts a directory entry from the specified stream.
Inherited from ExpandBaseTask
ExtractFile(Stream, string, string, DateTime, long) void
Extracts a file entry from the specified stream.
Inherited from ExpandBaseTask