You are here

public function FilesystemValidator::validateAreWritable in Simple OAuth (OAuth2) & OpenID Connect 5.x

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

Validate that {

Parameters

array $paths: List of URIs.

Throws

\Drupal\simple_oauth\Service\Exception\FilesystemValidationException

File

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

Class

FilesystemValidator
@internal

Namespace

Drupal\simple_oauth\Service\Filesystem

Code

public function validateAreWritable($paths) {
  foreach ($paths as $path) {
    if (!$this->fileSystemChecker
      ->isWritable($path)) {
      throw new FilesystemValidationException(strtr('Path "@path" is not writable.', [
        '@path' => $path,
      ]));
    }
  }
}