rigGetFileNames

Reads the specified directory and builds an array containing the filenames. Any sub-folders contained within the specified path are read as well if desired.

__Requires:__ rigListFilesWithPaths(), rigListFiles() __Format:__ rigGetFileNames(param1, param2, param3) __Parameters:__ string <pSourceDir> path to source, bool <pIncludePath> whether to include the path as part of the filename, bool <pRecursion> __Return:__ array

function rigGetFileNames pSourceDir pIncludePath pRecursion -- from filehelper.lc if pRecursion is TRUE then put TRUE into tRecursion else put FALSE into tRecursion end if # BUILD FILES LIST if pIncludePath is TRUE then put rigListFilesWithPaths(pSourceDir, tRecursion) into tFilesList else put rigListFiles(pSourceDir, tRecursion) into tFilesList end if # BUILD ARRAY put 0 into tCount repeat for each line thisLine in tFilesList add 1 to tCount put thisLine into tFilesListArray[tCount] end repeat return tFilesListArray end rigGetFileNames