It is the FileExists() function.
Here is a code sample from the help file to check if a file exists and then prompts for confirmation before deleting it:
Code:
if FileExists(FileName) then
if MessageDlg('Do you really want to delete ' + ExtractFileName(FileName) + '?'), mtConfirmation, [mbYes, mbNo], 0, mbNo) = IDYes then
DeleteFile(FileName);