IFile.Exists

Syntax

Exists(FileName: String): Boolean;

Parameters

FileName — path and name of the file, which existence must be checked.

Description

The Exists method returns whether the file exists.

Example

Sub Main;

Var

s: String;

Begin

If File.Exists("c:\New_folder\1.txt") Then

s:="Yes";

Else

s:="No";

End If;

End Sub Main;

After executing the example, the "s" variable contains Yes, if the 1.txt file exists.

See also:

IFile