function FileStorage::listAll
Same name in this branch
- 9 core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::listAll()
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::listAll()
- 8.9.x core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::listAll()
- 10 core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::listAll()
- 10 core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::listAll()
- 11.x core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::listAll()
- 11.x core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::listAll()
Overrides PhpStorageInterface::listAll
1 call to FileStorage::listAll()
- MTimeProtectedFastFileStorage::garbageCollection in core/
lib/ Drupal/ Component/ PhpStorage/ MTimeProtectedFastFileStorage.php - Performs garbage collection on the storage.
File
-
core/
lib/ Drupal/ Component/ PhpStorage/ FileStorage.php, line 198
Class
- FileStorage
- Stores the code as regular PHP files.
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.