You are here

private static function ScanDir::verifyPaths in Gutenberg 8

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

Verifies paths.

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

File

src/ScanDir.php, line 85

Class

ScanDir
Class ScanDir.

Namespace

Drupal\gutenberg

Code

private static function verifyPaths($paths) {
  $path_errors = [];
  if (gettype($paths) == "string") {
    $paths = [
      $paths,
    ];
  }
  foreach ($paths as $path) {
    if (is_dir($path)) {
      self::$directories[] = $path;
      $dirContents = self::findContents($path);
    }
    else {
      $path_errors[] = $path;
    }
  }
  if ($path_errors) {
    echo "The following directories do not exists<br />";
    die(var_dump($path_errors));
  }
}