Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 45e938ec34
Fetching contributors…

Cannot retrieve contributors at this time

executable file 34 lines (31 sloc) 0.721 kb
<?php
/** @file directorygraphiterator.inc
* @ingroup Examples
* @brief class DirectoryGraphIterator
* @author Marcus Boerger
* @date 2003 - 2008
*
* SPL - Standard PHP Library
*/
/** @ingroup Examples
* @brief A tree iterator that only shows directories.
* @author Marcus Boerger
* @version 1.1
*/
class DirectoryGraphIterator extends DirectoryTreeIterator
{
function __construct($path)
{
RecursiveIteratorIterator::__construct(
new RecursiveCachingIterator(
new ParentIterator(
new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME
)
),
CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD
),
parent::SELF_FIRST
);
}
}
?>
Jump to Line
Something went wrong with that request. Please try again.