target::exists

Checks whether the specified target exists.
bool target::exists(name)

Parameters

Name Type Description
name string The target to test.

Return Value

true if the specified target exists; otherwise, false.

Examples

Execute target "clean", if it exists.

    <if test="${target::exists('clean')}">
    <call target="clean" />
</if>

Requirements

Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Functions