DirectoryIterator::__construct Constructs a new directory iterator from a path &reftitle.description; public DirectoryIterator::__construct stringpath Constructs a new directory iterator from a path. &reftitle.parameters; path The path of the directory to traverse. &reftitle.errors; Throws an UnexpectedValueException if the path cannot be opened. Throws a RuntimeException if the path is an empty string. &reftitle.changelog; &Version; &Description; 5.3.0 Throws UnexpectedValueException if the path cannot be opened. 5.1.3 Throws RuntimeException if the path is an empty string. 5.1.0 Throws RuntimeException on error. Previously, threw Exception. &reftitle.examples; A <methodname>DirectoryIterator::__construct</methodname> example This example will list the contents of the directory containing the script. isDot()) { var_dump($fileinfo->getFilename()); } } ?> ]]> &reftitle.seealso; SplFileInfo Iterator