public function DeprecationAnalyser::getDirContents in Upgrade Status 8
Get directory contents recursively.
Parameters
string $dir: Path to directory.
Return value
array The list of files found.
1 call to DeprecationAnalyser::getDirContents()
- DeprecationAnalyser::analyse in src/
DeprecationAnalyser.php - Analyse the codebase of an extension including all its sub-components.
File
- src/
DeprecationAnalyser.php, line 281
Class
Namespace
Drupal\upgrade_statusCode
public function getDirContents(string $dir) {
$results = [];
$files = scandir($dir);
foreach ($files as $value) {
$path = realpath($dir . '/' . $value);
if (!is_dir($path)) {
$results[] = $path;
continue;
}
if ($value != '.' && $value != '..') {
$results = array_merge($results, $this
->getDirContents($path, $results));
}
}
return $results;
}