- This wiki is out of date, use the continuation of this wiki instead
 
Glob
From FenixWiki
(Difference between revisions)
												
			
			| Revision as of 09:02, 22 April 2007 (edit) 63.138.247.2 (Talk) (→Returns) ← Previous diff  | 
				Revision as of 15:24, 22 April 2007 (edit) (undo) Woody (Talk | contribs) Next diff →  | 
			||
| Line 1: | Line 1: | ||
| [[Category:functions]] | [[Category:functions]] | ||
| + | [[Category:files]] | ||
| ==Definition== | ==Definition== | ||
Revision as of 15:24, 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
						
			
		