class FileTypeFilterIterator extends FilterIterator

FileTypeFilterIterator only keeps files, directories, or both.

Constants

ONLY_FILES

ONLY_DIRECTORIES

Methods

rewind()

This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after rewind in some cases.

__construct(Iterator $iterator, int $mode)

No description

bool
accept()

Filters the iterator values.

Details

in FilterIterator at line 30
rewind()

This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after rewind in some cases.

at line 30
__construct(Iterator $iterator, int $mode)

Parameters

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

at line 42
bool accept()

Filters the iterator values.

Return Value

bool true if the value should be kept, false otherwise