You are here

function backup_migrate_destination_file_save in Backup and Migrate 5.2

File save destination callback.

2 string references to 'backup_migrate_destination_file_save'
backup_migrate_backup_migrate_destinations in includes/destinations.inc
Implementation of hook_backup_migrate_destinations().
backup_migrate_backup_migrate_destination_types in includes/destinations.inc
Implementation of hook_backup_migrate_destination_types().

File

includes/destinations.file.inc, line 12
Functions to handle the local server directory backup destinations.

Code

function backup_migrate_destination_file_save($destination, $file, &$settings) {
  if ($dir = @$destination['location']) {
    if (_backup_migrate_destination_file_check_dir($dir)) {
      $filepath = rtrim($dir, "/") . "/" . $settings['filename'];
      rename($file, $filepath);
      return $file;
    }
  }
}