 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Builder.com.au: How do I...recursively scan directories with PHP's DirectoryIterators?
by Chris Cornutt June 18, 2008 @ 07:55:21
Builder.com.au has a new tutorial posted today talking about the use if Iterators (from PHP's SPL) to recurse down through directories on your local drive.
One of PHP5's most interesting new features is the addition of Iterators, a collection of ready-made interfaces designed to help in navigating and processing hierarchical data structures. These Iterators significantly reduce the amount of code required to process an XML document tree or a file collection.
They give three examples - two basic ones showing a simple use of the DirectoryIterator and RecursiveDirectoryIterator and another slightly more complex one showing how to get information from the recursive iteration as it goes down.
voice your opinion now!
directoryiterator iterator recursive directory example
DevShed: Finding Paths, Timestamps and More with the DirectoryIterator Class in PHP
by Chris Cornutt September 18, 2006 @ 08:21:51
DevShed continues its look at the DirectoryIterator functionality in PHP5 with the second part of the series today - "Finding Paths, Timestamps and More with the DirectoryIterator Class in PHP".
Are you interested in having at your disposal a quick reference for working with the "DirectoryIterator" class that comes with PHP 5? Then this might be the article that you've been waiting for! Welcome to the second tutorial of the series "A Close Look at the DirectoryIterator Class in PHP 5." Over the course of this set of installments, you'll find complete coverage of the most important methods bundled with this class, and learn how to take advantage of their excellent functionality.
They cover even more functions in this part:
- rewind, current, valid
- getFileName, isFile
- getMTime, getATime, getCTime
- getPath, getPathName
Each set is supported by code and explaination to help introduce their concepts in a useful way.
voice your opinion now!
tutorial directoryiterator methods part2 path timestamp file tutorial directoryiterator methods part2 path timestamp file
|
Community Events
Don't see your event here? Let us know!
|