(PHP 5 >= 5.3.0, PHP 7)
Iterates through a file system in a similar fashion to glob().
$pattern
[, int $flags
= FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO
] )$path
[, int $flags
= FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS
] )