You are here

protected function FileCopy::getOverwriteMode in Migrate Plus 8.2

Determines how to handle file conflicts.

Return value

int Either FILE_EXISTS_REPLACE (default) or FILE_EXISTS_RENAME, depending on the current configuration.

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

File

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

Class

FileCopy
Copy a file from one place into another.

Namespace

Drupal\migrate_plus\Plugin\migrate\process

Code

protected function getOverwriteMode() {
  if (!empty($this->configuration['rename'])) {
    return FILE_EXISTS_RENAME;
  }
  return FILE_EXISTS_REPLACE;
}