You are here

private static function ScanDir::verifyPaths in Gutenberg 8.2

Same name and namespace in other branches
  1. 8 src/ScanDir.php \Drupal\gutenberg\ScanDir::verifyPaths()

Verifies paths.

Parameters

array $paths: Paths to scan.

1 call to ScanDir::verifyPaths()
ScanDir::scan in src/ScanDir.php
Scans directories.

File

src/ScanDir.php, line 112

Class

ScanDir
Class ScanDir.

Namespace

Drupal\gutenberg

Code

private static function verifyPaths(array $paths) {
  $path_errors = [];
  foreach ($paths as $path) {
    if (is_dir($path)) {
      self::$directories[] = $path;
      self::findContents($path);
    }
    else {
      $path_errors[] = $path;
    }
  }
  if ($path_errors) {
    throw new \RuntimeException("The following directories do not exists\n" . var_export($path_errors, TRUE));
  }
}