NAnt SDK Documentation - v0.92 |
|
TargetFunctions.Exists Method
Checks whether the specified target exists.
[Visual Basic]
<Function(Name:="exists")>
Public Function Exists( _
ByVal
name As
String _
) As
Boolean
[C#]
[Function(Name="exists")]
public
bool Exists(
string name);
Parameters
-
name
- The target to test.
Return Value
true if the specified target exists; otherwise, false.
Example
Execute target "clean", if it exists.
<if test="${target::exists('clean')}">
<call target="clean" />
</if>
See Also
TargetFunctions Class | NAnt.Core.Functions Namespace