function FileReadOnlyStorage::listAll
Same name in other branches
- 9 core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php \Drupal\Component\PhpStorage\FileReadOnlyStorage::listAll()
- 8.9.x core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php \Drupal\Component\PhpStorage\FileReadOnlyStorage::listAll()
- 10 core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php \Drupal\Component\PhpStorage\FileReadOnlyStorage::listAll()
Overrides PhpStorageInterface::listAll
File
-
core/
lib/ Drupal/ Component/ PhpStorage/ FileReadOnlyStorage.php, line 78
Class
- FileReadOnlyStorage
- Reads code as regular PHP files, but won't write them.
Namespace
Drupal\Component\PhpStorageCode
public function listAll() {
$names = [];
if (file_exists($this->directory)) {
foreach (new \DirectoryIterator($this->directory) as $fileinfo) {
if (!$fileinfo->isDot()) {
$name = $fileinfo->getFilename();
if ($name != '.htaccess') {
$names[] = $name;
}
}
}
}
return $names;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.