file_exists

Syntax:

file_exists(fname);


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


Returns: Boolean.


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.


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.