IFileSystemInfo.Exists

Syntax

Exists: Boolean;

Description

The Exists property returns whether a file exists.

Example

Sub Main;

Var

FileSInfo: IFileSystemInfo;

s: String;

Begin

FileSInfo:=New FileInfo.Attach("c:\1.txt");

If FileSInfo.Exists Then

s:="Yes";

Else

s:="No";

End If;

Dispose FileSInfo;

End Sub Main;

After executing the example, the "s" variable contains Yes if the 1.txt file exists in the root directory of disc C.

See also:

IFileSystemInfo