public function FileReadOnlyStorage::listAll
public FileReadOnlyStorage::listAll()
Lists all the files in the storage.
Return value
array Array of filenames.
Overrides PhpStorageInterface::listAll
File
- core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php, line 85
Class
- FileReadOnlyStorage
- Reads code as regular PHP files, but won't write them.
Namespace
Drupal\Component\PhpStorageCode
public function listAll() { $names = array(); 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; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!PhpStorage!FileReadOnlyStorage.php/function/FileReadOnlyStorage::listAll/8.1.x