[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Dialogs' (#lcl)

# TSelectDirectoryDialog.CheckFileMustExist

Checks whether a specified directory already exists, and displays a message when missing.

## Declaration

Source position: dialogs.pp line 284

`protected function TSelectDirectoryDialog.CheckFileMustExist(`
`const AFilename: string`
`):Boolean; override;`

## Arguments

`AFilename` |  | Directory name examined in the method.

## Function result

True if the specified directory exists, and False when it is missing.

## Description

CheckFileMustExist is an overridden Boolean function in TSelectDirectoryDialog. It is check whether the directory specified in AFilename already exists on the file system. The return value is True if the directory in AFilename already exists. It is False if the directory does not exist.

CheckFileMustExist re-implements the method inherited from TOpenDialog to use directory-specific resource strings when messages are displayed for a missing value in AFilename.

CheckFileMustExist is called from the CheckFile method in TOpenDialog.

## See also

TOpenDialog.CheckFileMustExist |  | Determines whether the specified file name exists.
TOpenDialog.CheckFile |  | Ensures the specified file name meets the requirements for the dialog.
DirPathExists