FileExists
Jump to navigation
Jump to search
This functions checks whether a specified file exists inside a resource.
Syntax
bool fileExists ( string filePath )
Required Arguments
- filePath: The filepath of the file, whose existence is going to be checked, in the following format: ":resourceName/path". 'resourceName' is the name of the resource the file is checked to be in, and 'path' is the path from the root directory of the resource to the file.
- For example, if you want to check whether a file named 'myfile.txt' exists in the resource 'mapcreator', it can be done from another resource this way: fileExists(":mapcreator/myfile.txt").
- If the file, whose existence is going to be checked, is in the current resource, only the file path is necessary, e.g. fileExists("myfile.txt").
Returns
Returns true if the file exists, false otherwise.
Example
--TODO