Iterators
PHP Manual

The RecursiveDirectoryIterator class

Introduction

The RecursiveDirectoryIterator provides an interface for iterating recursively over filesystem directories.

Class synopsis

RecursiveDirectoryIterator extends FilesystemIterator implements Traversable , Iterator , SeekableIterator , RecursiveIterator {
/* Methods */
__construct ( string $path [, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO ] )
object getChildren ( void )
public string getSubPath ( void )
public string getSubPathname ( void )
bool hasChildren ([ bool $allow_links ] )
string key ( void )
void next ( void )
void rewind ( void )
/* Inherits */
FilesystemIterator::__construct ( string $path [, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS ] )
public mixed FilesystemIterator::current ( void )
public int FilesystemIterator::getFlags ( void )
public string FilesystemIterator::key ( void )
public void FilesystemIterator::next ( void )
public void FilesystemIterator::rewind ( void )
public void FilesystemIterator::setFlags ([ int $flags ] )
}

Changelog

Version Description
5.3.0 The FilesystemIterator was introduced as the parent class. Previously, the parent was the DirectoryIterator.
5.3.0 Implements SeekableIterator.
5.2.11, 5.3.1 Added RecursiveDirectoryIterator::FOLLOW_SYMLINKS

Table of Contents


Iterators
PHP Manual