This function will return true if the indicated directory exists or false if it does not. The specified name must include the full path, not a relative path and by default you cannot access any directories from outside the game bundle as all games are sandboxed (see the section on the File System for more information).
directory_exists(dname)
Argument | Type | Description |
---|---|---|
dname | String | The name of the directory to look for. |
if (directory_exists(working_directory + "Saves/"))
{
file = file_find_first(working_directory + "Saves/*.doc", fa_readonly);
}
This will check to see if the specified directory exists then, if it does, go there and return the first "read only" doc file found.