12 namespace Symfony\Component\Finder\Iterator;
45 if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
46 throw new \RuntimeException(
'This iterator only support returning current as fileinfo.');
49 parent::__construct($path, $flags);
60 return new SplFileInfo(parent::current()->getPathname(), $this->getSubPath(), $this->getSubPathname());
71 $children = parent::getChildren();
73 if ($children instanceof
self) {
79 }
catch (\UnexpectedValueException $e) {
80 if ($this->ignoreUnreadableDirs) {
82 return new \RecursiveArrayIterator(array());
111 if (null !== $this->rewindable) {
115 if (
false !== $stream = @opendir($this->getPath())) {
116 $infos = stream_get_meta_data($stream);
119 if ($infos[
'seekable']) {
120 return $this->rewindable =
true;
124 return $this->rewindable =
false;