function backup_migrate_drush_destination_files

cis7 backup_migrate.drush.inc backup_migrate_drush_destination_files($destination_id = NULL)
cle7 backup_migrate.drush.inc backup_migrate_drush_destination_files($destination_id = NULL)
elmsmedia7 backup_migrate.drush.inc backup_migrate_drush_destination_files($destination_id = NULL)
icor7 backup_migrate.drush.inc backup_migrate_drush_destination_files($destination_id = NULL)
meedjum_blog7 backup_migrate.drush.inc backup_migrate_drush_destination_files($destination_id = NULL)
mooc7 backup_migrate.drush.inc backup_migrate_drush_destination_files($destination_id = NULL)

Get a list of files in a given destination

1 string reference to 'backup_migrate_drush_destination_files'
backup_migrate_drush_command in sites/all/modules/ulmus/backup_migrate/includes/backup_migrate.drush.inc
Implementation of hook_drush_command().

File

sites/all/modules/ulmus/backup_migrate/includes/backup_migrate.drush.inc, line 191
Drush commands for backup and migrate.

Code

function backup_migrate_drush_destination_files($destination_id = NULL) {
  backup_migrate_include('destinations');

  // Set the message mode to drush output.
  _backup_migrate_message_callback('_backup_migrate_message_drush');

  if (!$destination_id) {
    _backup_migrate_message("You must specify an existing destination. Try using 'drush bam-destinations' to get a list of available destinations.", array('@destination' => $destination_id), 'error');
    return;
  }
  if (!$destination = backup_migrate_get_destination($destination_id)) {
    _backup_migrate_message("Could not find the destination '@destination'. Try using 'drush bam-destinations' to get a list of available destinations.", array('@destination' => $destination_id), 'error');
    return;
  }

  $out = array(array(
    dt('Filename'),
    dt('Date'),
    dt('Age'),
    dt('Size'),
  ));

  $files = $destination->list_files();
  $i = 0;
  foreach ((array) $files as $file) {
    // Show only files that can be restored from.
    if ($file->is_recognized_type()) {
      $info = $file->info();
      $out[] = array(
        check_plain($info['filename']),
        format_date($info['filetime'], 'small'),
        format_interval(time() - $info['filetime'], 1),
        format_size($info['filesize']),
      );
    }
  }
  if (count($out) > 1) {
    drush_print_table($out, TRUE);
  }
  else {
    drush_print(dt('There are no backup files to display.'));
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.