Symfony2 API
Class

Symfony\Component\Finder\Iterator\FileTypeFilterIterator

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.

from FilterIterator
__construct(Iterator $iterator, integer $mode)

Constructor.

Boolean accept()

Filters the iterator values.

Details

in FilterIterator at line 29
public rewind()

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

See also

FilterIterator::rewind()

at line 32
public __construct(Iterator $iterator, integer $mode)

Constructor.

Parameters

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

at line 44
public Boolean accept()

Filters the iterator values.

Return Value

Boolean true if the value should be kept, false otherwise