Skip to end of metadata
Go to start of metadata

Availability

This routine is available starting with SIL Engine™ 1.0.

Syntax

fileExists(path_to_file)

Description

Returns 'true' if the file exists and 'false' otherwise.

Parameters

Parameter name

Type

Required

Description

path_to_file

string

Yes

Specifies the file name you want to search for.

Return type

boolean (true/false)

Example

if(fileExists("C:/someFile.txt")){
    print("The file exists!");
} else {
    print("The file does not exist!");
}

Notes

It is recommended that you use forward slashes ( / ) for file paths.

See also