file_scan_directory($dir, $mask, $options = array(), $depth = 0)
Finds all files that match a given mask in a given directory.
Directories and files beginning with a dot are excluded; this prevents hidden files and directories (such as SVN working directories) from being scanned. Use the umask option to skip configuration directories to eliminate the possibility of accidentally exposing configuration information. Also, you can use the base directory, recurse, and min_depth options to improve pe