NAnt SDK Documentation - v0.92 |

# ConsoleDriver.GetBuildFileName Method

Gets the file name for the build file in the specified directory.

[Visual Basic]
Public Shared Function GetBuildFileName( _
ByVal directory As String, _
ByVal searchPattern As String, _
ByVal findInParent As Boolean _
) As String
[C#]
public static string GetBuildFileName(
string directory,
string searchPattern,
bool findInParent
);

#### Parameters

directory
  The directory to look for a build file. When in doubt use Environment.CurrentDirectory for directory.
searchPattern
  Look for a build file with this pattern or name. If null look for a file that matches the default build pattern (*.build).
findInParent
  Whether or not to search the parent directories for a build file.

#### Return Value

The path to the build file or `null` if no build file could be found.

#### See Also

ConsoleDriver Class | NAnt.Core Namespace