You are here

function backup_migrate_destination_filesource::sources in Backup and Migrate 8.3

Same name and namespace in other branches
  1. 6.3 includes/sources.filesource.inc \backup_migrate_destination_filesource::sources()
  2. 7.3 includes/sources.filesource.inc \backup_migrate_destination_filesource::sources()

Declare the current files directory as a backup source..

1 method overrides backup_migrate_destination_filesource::sources()
backup_migrate_files_destination_archivesource::sources in includes/sources.archivesource.inc
Declare the current files directory as a backup source..

File

includes/sources.filesource.inc, line 25
A destination type for saving locally to the server.

Class

backup_migrate_destination_filesource
A destination type for saving locally to the server.

Code

function sources() {
  $out = array();
  $out['files'] = backup_migrate_create_destination('filesource', array(
    'machine_name' => 'files',
    'location' => 'public://',
    'name' => t('Public Files Directory'),
    'show_in_list' => FALSE,
  ));
  if (variable_get('file_private_path', FALSE)) {
    $out['files_private'] = backup_migrate_create_destination('filesource', array(
      'machine_name' => 'files',
      'location' => 'private://',
      'name' => t('Private Files Directory'),
      'show_in_list' => FALSE,
    ));
  }
  return $out;
}