GetFileList
The GetFileList function returns a table containing the names of files in a folder. The names are included if they match a specified template.
nFiles = GetFileList( sFolder, sTemplate, Table )
where
sFolder is the folder to search.
sTemplate is the name pattern to match.
Table is a lua table to which the filenames will be added.
nFiles is the number of files in the file list. if nFiles> 0 then Table is filled with strings. On failure,nFiles=0.
This function creates a table that can be parsed using the Lua pairs function, as shown below. The names do no unpack in any "nice" order, s alphabetical. Also see the CFindFiles class for a more powerful way of loading files from a folder.