GetDirectoryList
From Spheriki
Returns an array filled with names of all directories found within a specific directory.
Contents |
[edit]
Usage
function GetDirectoryList(directory);
Default directory is the current game's directory. Navigate to others using ../ by going up one directory.
[edit]
Examples
var folders = GetDirectoryList("save");
for(i = 0; i < folders.length; i++){
GetSystemFont().drawText(5, 5 + (i * 15), folders[i]);
}
FlipScreen();
GetKey();
A crude (but neat) script to list all folders in the current game's /save/ directory and display them on the screen. This shows how GetDirectoryList can be used to organize files in a subfolder.
[edit]
Notes
- To get to the "games" directory use "../".
- Returns an empty array object, if no directories found.
[edit]

