Kevin Waterson has posted a new tutorial to the PHPro.org website today - a pretty comprehensive look at the DirectoryIterator in the Standard PHP Library (SPL).
SPL provides a standard set of interfaces for PHP5. The aim of SPL is to implement some efficient data access interfaces and classes for PHP. Functionally it is designed to traverse aggregate structures (anything you want to loop over). These may include arrays, database result sets, xml trees, directory listings or any list at all. Currently SPL deals with Iterators.
He looks at functionality like the Directory Iterator, getting the file owner, checking to see if a file is valid and how to rewind an iterator.