function FileCopy::isLocationUnchanged

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/process/FileCopy.php \Drupal\migrate\Plugin\migrate\process\FileCopy::isLocationUnchanged()
  2. 10 core/modules/migrate/src/Plugin/migrate/process/FileCopy.php \Drupal\migrate\Plugin\migrate\process\FileCopy::isLocationUnchanged()
  3. 11.x 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.