ConcatTask Class

Summary

A task that concatenates a set of files. Loosely based on Ant's Concat task.
Assembly
NAnt.Contrib.dll
Namespace
NAnt.Contrib.Tasks
Base Types
  • Task
graph BT Type-->Base0["Task"] Type["ConcatTask"] class Type type-node

Syntax

[TaskName("concat")]
public class ConcatTask : Task

Examples

    <concat destfile="${outputdir}\Full.txt" append="true">
    <fileset>
        <include name="${outputdir}\Test-*.txt" />
    </fileset>
</concat>

Remarks

This task takes a set of input files in a fileset and concatenates them into a single file. You can either replace the output file, or append to it by using the append attribute.

The order the files are concatenated in is not especified.

Attributes

Type Description
TaskName

Properties

Name Value Summary
Append bool
Specifies whether to append to the destination file. The default is false.
DestinationFile FileInfo
Name of the destination file.
FileSet FileSet
Set of files to use as input.

Methods

Name Value Summary
ExecuteTask() void
This is where the work is done
Initialize() void
Initializes task and ensures the supplied attributes are valid.