You are here

protected function FileCopy::isLocationUnchanged in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/process/FileCopy.php \Drupal\migrate\Plugin\migrate\process\FileCopy::isLocationUnchanged()

Determines if the source and destination URIs represent identical paths.

Parameters

string $source: The source URI.

string $destination: The destination URI.

Return value

bool TRUE if the source and destination URIs refer to the same physical path, otherwise FALSE.

1 call to FileCopy::isLocationUnchanged()
FileCopy::transform in core/modules/migrate/src/Plugin/migrate/process/FileCopy.php
Performs the associated process.

File

core/modules/migrate/src/Plugin/migrate/process/FileCopy.php, line 231

Class

FileCopy
Copies or moves a local file from one place into another.

Namespace

Drupal\migrate\Plugin\migrate\process

Code

protected function isLocationUnchanged($source, $destination) {
  return $this->fileSystem
    ->realpath($source) === $this->fileSystem
    ->realpath($destination);
}