- This wiki is out of date, use the continuation of this wiki instead
Glob
From FenixWiki
(Difference between revisions)
Revision as of 09:01, 22 April 2007 (edit) 63.138.247.2 (Talk) ← Previous diff |
Revision as of 09:02, 22 April 2007 (edit) (undo) 63.138.247.2 (Talk) (→Returns) Next diff → |
||
Line 17: | Line 17: | ||
== Returns == | == Returns == | ||
- | '''STRING''' : Returns the filename of the found file, or an empty string | + | '''STRING''' : Returns the filename of the found file, or an empty string if it couldn't find anything. |
- | + | ||
== Example == | == Example == |
Revision as of 09:02, 22 April 2007
Contents |
Definition
INT glob ( <STRING directory> )
Gets a single filename from the directory specified and keeps returning new ones on subsequent calls until it can't find any more.
Parameters
STRING directory | - The folder in which you want to look, as well as any simple requirements for filenames such as extensions. |
Returns
STRING : Returns the filename of the found file, or an empty string if it couldn't find anything.
Example
BEGIN LOOP string1=GLOB("levels\*.tul"); //looks for a file in the relative folder "levels" that has the file extension "tul". IF (string1<>"") alllevels[z]=string1; z++; ELSE numberlevels=z; BREAK; END END END