View Single Post
Old 01-13-2008, 07:40 PM   #4 (permalink)
RobertK
The Addict
Top Contributor Good Samaritan 
 
Join Date: Jan 2008
Location: USA
Posts: 217
Thanks: 16
RobertK is on a distinguished road
Arrow

Quote:
Originally Posted by Wildhoney View Post
Glob would look much neater than readdir ! I personally think they should remove all the others and leave us with glob.
I disagree; unless they add recursive search abilities to glob(), it's much easier to design with readdir() and scandir() than glob. You're making it out to be annoying, when it really isn't. Just don't use it if you hate it.

I wrote a tutorial seven months ago that you probably read, if you visit Pixel2Life and read tutorials there, about implementing recursive searches--and helped someone extend it to include keyword searching as well. It wouldn't be hard, at all, to check for an extension on the end of that. For one directory, sure glob is nice, otherwise forget it. I used scandir to get all elements within the directory, and then discern what I wanted to do with them from there.
__________________
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning. - Rich Cook
RobertK is offline  
Reply With Quote