I actually had it first with DirectoryIterator =)...its all about that SKIP_DOTS flag which isn't available in DirectoryIterator =)...and prevents the less elegant if ( !$file->isDot() ) thing...

Maybe I suck at googling, but for me it's really hard to find out when exactly some Class or method was introduced, how do you do that @rtripault? What about RecursiveIterator and RecursiveDirectoryIterator? Would they work with PHP 5.1.2? (can not imagine)