- This wiki is out of date, use the continuation of this wiki instead
File exists
From FenixWiki
Contents |
[edit] Definition
INT file_exists ( <STRING filename> )
Checks if a certain file exists.
[edit] Parameters
| STRING filename | - The file to be checked for existence, including a possible path. |
[edit] Returns
INT : The existence of the file.
| true | - The specified file exists. |
| false | - The specified file doesn't exist. |
[edit] Example
Program existence;
Begin
say("> C:\Windows\notepad.exe > " + file_exists("C:\Windows\notepad.exe")); // A filename with
// absolute path
say("> SDL.dll > " + file_exists("SDL.dll")); // A filename without a path
say("> SomeNonExistingFile > " + file_exists("SomeNonExistingFile")); // A nonexisting file
Repeat
frame;
Until(key(_esc))
End
Used in example: say()
