You are here

function backup_migrate_destination::load_files_info in Backup and Migrate 7.2

Same name and namespace in other branches
  1. 8.2 includes/destinations.inc \backup_migrate_destination::load_files_info()
  2. 8.3 includes/destinations.inc \backup_migrate_destination::load_files_info()
  3. 6.3 includes/destinations.inc \backup_migrate_destination::load_files_info()
  4. 7.3 includes/destinations.inc \backup_migrate_destination::load_files_info()

Load up the file's metadata from the accompanying .info file if applicable.

1 call to backup_migrate_destination::load_files_info()
backup_migrate_destination::list_files in includes/destinations.inc
List all the available files in the given destination with their destination specific id.

File

includes/destinations.inc, line 684

Class

backup_migrate_destination
A base class for creating destinations.

Code

function load_files_info($files) {
  foreach ($files as $key => $file) {
    if (isset($files[$key . '.info'])) {

      // See if there is an info file with the same name as the backup.
      $info = drupal_parse_info_file($files[$key . '.info']
        ->filepath());

      // Allow the stored metadata to override the detected metadata.
      $file->file_info = $info + $file->file_info;

      // Remove the metadata file from the list
      unset($files[$key . '.info']);
    }
  }
  return $files;
}