|All requests||>||list files and folders||>||Request new recommendation||>||Featured requests||>||No recommendations|
by Agustín Sardón - 6 years ago (2015-04-27)
given a directory, list files and folders on that directory
Like Ravi's, my class uses Iterators, which process with the loop, so it's cancelable and doesn't take much memory; which makes looping 100000+ files very easy. Regex supported. Hope it helps.
As Dave said there are plenty to choose, hope this helps.
The getfiles() method in my class lists all the files in a given directory, and returns an array of the names. You can filter out which files you want with a regular expression. Sorry, doesn't include directories, though.
There are plenty to choose from, this is the one that I would start with to see if it meets your needs.