GetAllFilesInDirectory
Introduction
GetAllFilesInDirectory is a method which can be used to get all files in a given directory and its sub-directories. The overloads for this method provide constraints such as the number of levels deep to search, and limitations on the file types.
Overloads
The following call:
is equivalent to calling:
An empty string as the fileType will return all contained files.
Code Example
The following code creates a ListBox to display all .jpg files which exist in the c:\Projects directory. If you do not have this directory on your computer, you will need to change the directory variable. Keep in mind that if the depth variable is large, or if the argument directory has a lot of files and sub-directories, this call can take a long time to execute. Add the following using statements:
Add the following to Initialize after initializing FlatRedBall:
Last updated