public function RecursiveDirectoryIterator::isRewindable in Database Sanitize 7
Checks if the stream is rewindable.
Return value
bool true when the stream is rewindable, false otherwise
Overrides RecursiveDirectoryIterator::isRewindable
1 call to RecursiveDirectoryIterator::isRewindable()
- RecursiveDirectoryIterator::rewind in vendor/
symfony/ finder/ Iterator/ RecursiveDirectoryIterator.php - Do nothing for non rewindable stream.
1 method overrides RecursiveDirectoryIterator::isRewindable()
- RecursiveDirectoryIterator::isRewindable in vendor/
symfony/ finder/ Iterator/ RecursiveDirectoryIterator.php - Checks if the stream is rewindable.
File
- vendor/
symfony/ finder/ Iterator/ RecursiveDirectoryIterator.php, line 132
Class
- RecursiveDirectoryIterator
- Extends the \RecursiveDirectoryIterator to support relative paths.
Namespace
Symfony\Component\Finder\IteratorCode
public function isRewindable() {
if (null !== $this->rewindable) {
return $this->rewindable;
}
// workaround for an HHVM bug, should be removed when https://github.com/facebook/hhvm/issues/7281 is fixed
if ('' === $this
->getPath()) {
return $this->rewindable = false;
}
if (false !== ($stream = @opendir($this
->getPath()))) {
$infos = stream_get_meta_data($stream);
closedir($stream);
if ($infos['seekable']) {
return $this->rewindable = true;
}
}
return $this->rewindable = false;
}