file::exists

Determines whether the specified file exists.
bool file::exists(file)

Parameters

Name Type Description
file string The file to check.

Return Value

true if file refers to an existing file; otherwise, false.

Examples

Execute a set of tasks, if file "output.xml" does not exist.

    <if test="${not file::exists('output.xml')}">
    ...
</if>

Requirements

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