Summary
Checks whether the specified target exists.
Syntax
[Function("exists")]
public bool Exists(string name)
Examples
Execute target "clean", if it exists.
<if test="${target::exists('clean')}">
<call target="clean" />
</if>
Attributes
Type |
Description |
FunctionAttribute |
Indicates that the method should be exposed as a function in NAnt build
files.
|
Parameters
Name |
Type |
Description |
name |
string |
The target to test. |
Return Value
Type |
Description |
bool |
true if the specified target exists; otherwise,
false .
|