You are here

public function backup_migrate_destination_files::load_file in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.2 includes/destinations.file.inc \backup_migrate_destination_files::load_file()
  2. 8.3 includes/destinations.file.inc \backup_migrate_destination_files::load_file()
  3. 6.3 includes/destinations.file.inc \backup_migrate_destination_files::load_file()
  4. 6.2 includes/destinations.file.inc \backup_migrate_destination_files::load_file()
  5. 7.2 includes/destinations.file.inc \backup_migrate_destination_files::load_file()

File load destination callback.

Overrides backup_migrate_destination::load_file

File

includes/destinations.file.inc, line 77
A destination type for saving locally to the server.

Class

backup_migrate_destination_files
A destination type for saving locally to the server.

Code

public function load_file($file_id) {
  $filepath = $this
    ->get_filepath($file_id);
  if (file_exists($filepath)) {
    require_once dirname(__FILE__) . '/files.inc';
    return new backup_file(array(
      'filepath' => $filepath,
    ));
  }
}