```delphi
function FileExists(const FileName: string): Boolean;
```
[[Delphi/Funkcje|Funkcja]] sprawdza czy plik określony w parametrze FileName, istnieje ([[Delphi/True]]) czy też nie ([[Delphi/False]]).
if FileExists('C:\foo.txt') then
DeleteFile('C:\foo.txt');