You are here

function backup_migrate_destination_file_load in Backup and Migrate 5.2

File load destination callback.

2 string references to 'backup_migrate_destination_file_load'
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 25
Functions to handle the local server directory backup destinations.

Code

function backup_migrate_destination_file_load($destination, $file_id) {
  $filepath = rtrim($destination['location'], '/') . '/' . $file_id;
  if (file_exists($filepath)) {
    require_once './' . drupal_get_path('module', 'backup_migrate') . '/includes/files.inc';
    return backup_migrate_file_info($filepath);
  }
}