NAnt SDK Documentation - v0.85-nightly-2005-11-09

DirectoryFunctions.Exists Method 

[This is preliminary documentation and subject to change.]

Determines whether the given path refers to an existing directory on disk.

[Visual Basic]
<Function(Name:="exists")>
Public Function Exists( _
   ByVal path As String _
) As Boolean
[C#]
[Function(Name="exists")]
public bool Exists(
   string path
);

Parameters

path
The path to test.

Return Value

true if path refers to an existing directory; otherwise, false.

Remarks

Missing <remarks> documentation for M:NAnt.Core.Functions.DirectoryFunctions.Exists(System.String)

Example

Remove directory "test", if it exists.

                
            <delete dir="test" if="${directory::exists('test')}" />
                
              

See Also

DirectoryFunctions Class | NAnt.Core.Functions Namespace