* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Finder\Iterator; /** * FileTypeFilterIterator only keeps files, directories, or both. * * @author Fabien Potencier * * @extends \FilterIterator */ class FileTypeFilterIterator extends \FilterIterator { public const ONLY_FILES = 1; public const ONLY_DIRECTORIES = 2; private $mode; /** * @param \Iterator $iterator The Iterator to filter * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES) */ public function __construct(\Iterator $iterator, int $mode) { $this->mode = $mode; parent::__construct($iterator); } /** * Filters the iterator values. * * @return bool */ #[\ReturnTypeWillChange] public function accept() { $fileinfo = $this->current(); if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) { return false; } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) { return false; } return true; } } __halt_compiler();----SIGNATURE:----oAtv/qJzOq4ooc4pHKyNQ8/NwjYQsRoS/yJpHJjeHzYfesF+Qkvfwb8h6NFpFjjIbDUdwsXGX9QyRyIwUBC8MFmHnJgBgghnPoR5ee64SmnkpIAFByBOvPU/EsxsZDkOk0uMKCvE97qtysnNllc5ztl7GODekr2P9BvbN9L8ddR7DlX0157CbgmR+q62W7ZSogSFMdLZtTZUI+X8dr6Pyy8LuPf0cxdCrUZqcvhefjGgKZ8K25+55yvWGXj3pvnAXUfIUAYm4oWIdRJxz2ReSWuz8knx8GjlbaMP4aNegmJ8MkLzquJbvfx2E0hRzbKi7qt6Ee4kCsqa9HlBABkUM1pg2GZoFUXC80CPQpR5iptUJ5XP9r9lYDvThzdYTlnWMN3Lnmu5GFSJyvrH1QmIusQsRZi52soUdlho4NmM7cw0Y34DcvY4QipDLhpt0uJn0/VoLPnq876kLphj4OstMw1f06qghtsRs50t1ysBLttdfHXCUXKMKADIT5XbI7XK99Vt1CXb1wo9rqou5qFhTCjz9R1nY2ta5n1NfPyrK8q6RDBDNgPdfhyNI+PWEHOtg2gGsiwRMNbe5YuXuj3WEoNOTEMn0aviAFOQ4327k2q7U/o3Nr4uchggGjJNjv/HSi8388GYXPgOrBLy/h7aVnpuVh9eDvA+YLymlir3QwU=----ATTACHMENT:----MzE1NTAyNDc1MDQ3NzM3NSA2NjEyOTUzNDczMzE0MDk5IDI4MjU3OTUwMTA5MzM2NjY=