file_exists

Returns whether a given file exists or not.

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.


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.


Back: File System Functions
Next: file_delete
© Copyright YoYo Games Ltd. 2018 All Rights Reserved