file_exists


Description

This function will return true if the specified file exists and false if it does not. Note that the function can only be used to check local files, but not any files stored on a remote server.


Syntax:

file_exists(fname);

Argument Description
fname The name of the file to check for.


Returns:

Boolean


Example:

if file_exists("level.txt")
    {
    file = file_text_open_read("level.txt");
    }

This would check for a file and if it exists it is opened for reading.