W3cubDocs

/Symfony 4.1

FileTypeFilterIterator

class FileTypeFilterIterator extends FilterIterator

FileTypeFilterIterator only keeps files, directories, or both.

Constants

ONLY_FILES
ONLY_DIRECTORIES

Methods

__construct(Iterator $iterator, int $mode)
bool accept()

Filters the iterator values.

Details

__construct(Iterator $iterator, int $mode)

Parameters

Iterator $iterator The Iterator to filter
int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)

bool accept()

Filters the iterator values.

Return Value

bool true if the value should be kept, false otherwise

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.html