Files and Folders: PHP File System Parser Er Galvão Abbott (contact me)
This class can be used to retrieve the list of files and directories in a given file system.
It can traverse a given directory recursively and extract the paths of the files and directories that it encounters.
The class returns the total number of files and directories found. Optionally it can also return the number of symbolic links.