You are here

private function ExcludedPathsSubscriber::getFilesPath in Automatic Updates 8.2

Returns the storage path for a stream wrapper.

This will only work for stream wrappers that extend \Drupal\Core\StreamWrapper\LocalStream, which includes the stream wrappers for public and private files.

Parameters

string $scheme: The stream wrapper scheme.

Return value

string|null The storage path for files using the given scheme, relative to the Drupal root, or NULL if the stream wrapper does not extend \Drupal\Core\StreamWrapper\LocalStream.

1 call to ExcludedPathsSubscriber::getFilesPath()
ExcludedPathsSubscriber::preStart in src/Event/ExcludedPathsSubscriber.php
Reacts to the beginning of an update process.

File

src/Event/ExcludedPathsSubscriber.php, line 148

Class

ExcludedPathsSubscriber
Defines an event subscriber to exclude certain paths from update operations.

Namespace

Drupal\automatic_updates\Event

Code

private function getFilesPath(string $scheme) : ?string {
  $wrapper = $this->streamWrapperManager
    ->getViaScheme($scheme);
  if ($wrapper instanceof LocalStream) {
    return $wrapper
      ->getDirectoryPath();
  }
  return NULL;
}