- This wiki is out of date, use the continuation of this wiki instead
Glob
From FenixWiki
Contents |
Definition
INT glob ( <STRING criteria> )
Gets a single filename matching the criteria and keeps returning new ones on subsequent calls until it can't find any more, in which case it returns "". To restart the search, a call to frame() is needed, in which case frame(0); can come in handy.
Parameters
| STRING criteria | - Search criteria: the folder in which you want to look, as well as any simple requirements for filenames such as extensions. |
Returns
STRING : Filename
| "" | - No (new) file entries. |
| !"" | - The filename of a file entry matching the search criteria. |
Example
Program files;
Private
String filename;
Begin
// method two:
While( (filename = Glob("levels\*.tul")) != "" )
load_level(filename);
End
End
