IFileSystemInfo.Exists

Syntax

Exists: Boolean;

Description

The Exists property returns whether a file exists.

Example

Sub UserProc;
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 UserProc;

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