You are here

function backup_migrate_destination_files::list_files in Backup and Migrate 6.2

File list destination callback.

Overrides backup_migrate_destination::list_files

1 call to backup_migrate_destination_files::list_files()
backup_migrate_destination_files::get_file in includes/destinations.file.inc
Get the file object for the given file.

File

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

Class

backup_migrate_destination_files
A destination type for saving locally to the server.

Code

function list_files() {
  $files = array();
  if ($dir = $this
    ->get_location()) {
    if ($handle = @opendir($dir)) {
      backup_migrate_include('files');
      while (FALSE !== ($file = readdir($handle))) {
        $filepath = $dir . "/" . $file;
        $files[$file] = new backup_file(array(
          'filepath' => $filepath,
        ));
      }
    }
  }
  return $files;
}