You are here

public function FilesystemValidator::validateAreDirs in Simple OAuth (OAuth2) & OpenID Connect 8.4

Same name and namespace in other branches
  1. 8.3 src/Service/Filesystem/FilesystemValidator.php \Drupal\simple_oauth\Service\Filesystem\FilesystemValidator::validateAreDirs()
  2. 5.x src/Service/Filesystem/FilesystemValidator.php \Drupal\simple_oauth\Service\Filesystem\FilesystemValidator::validateAreDirs()

Validate that {

Parameters

array $paths: List of URIs.

Throws

\Drupal\simple_oauth\Service\Exception\FilesystemValidationException

File

src/Service/Filesystem/FilesystemValidator.php, line 51

Class

FilesystemValidator
@internal

Namespace

Drupal\simple_oauth\Service\Filesystem

Code

public function validateAreDirs($paths) {
  foreach ($paths as $path) {
    if (!$this->fileSystemChecker
      ->isDirectory($path)) {
      throw new FilesystemValidationException(strtr('Directory "@path" is not a valid directory.', [
        '@path' => $path,
      ]));
    }
  }
}