You are here

protected function FileCopy::isLocalUri in Migrate Plus 8.2

Determines if the given URI or path is considered local.

A URI or path is considered local if it either has no scheme component, or the scheme is implemented by a stream wrapper which extends \Drupal\Core\StreamWrapper\LocalStream.

Parameters

string $uri: The URI or path to test.

Return value

bool

2 calls to FileCopy::isLocalUri()
FileCopy::isLocationUnchanged in src/Plugin/migrate/process/FileCopy.php
Determines if the source and destination URIs represent identical paths.
FileCopy::transform in src/Plugin/migrate/process/FileCopy.php
Performs the associated process.

File

src/Plugin/migrate/process/FileCopy.php, line 210

Class

FileCopy
Copy a file from one place into another.

Namespace

Drupal\migrate_plus\Plugin\migrate\process

Code

protected function isLocalUri($uri) {
  $scheme = $this->fileSystem
    ->uriScheme($uri);
  return $scheme === FALSE || $this->streamWrapperManager
    ->getViaScheme($scheme) instanceof LocalStream;
}