You are here

function backup_migrate_destination_files_list in Backup and Migrate 5.2

File list destination callback.

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

Code

function backup_migrate_destination_files_list($destination) {
  $files = array();
  if ($dir = @$destination['location']) {
    if ($handle = opendir($dir)) {
      require_once './' . drupal_get_path('module', 'backup_migrate') . '/includes/files.inc';
      while (FALSE !== ($file = readdir($handle))) {
        $filepath = $dir . "/" . $file;
        if ($info = backup_migrate_file_info($filepath)) {
          $files[$file] = $info;
        }
      }
    }
  }
  return $files;
}