public function backup_migrate_destination_files::_list_files in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.2 includes/destinations.file.inc \backup_migrate_destination_files::_list_files()
- 8.3 includes/destinations.file.inc \backup_migrate_destination_files::_list_files()
- 6.3 includes/destinations.file.inc \backup_migrate_destination_files::_list_files()
- 7.2 includes/destinations.file.inc \backup_migrate_destination_files::_list_files()
File list destination callback.
Overrides backup_migrate_destination::_list_files
File
- includes/
destinations.file.inc, line 100 - A destination type for saving locally to the server.
Class
- backup_migrate_destination_files
- A destination type for saving locally to the server.
Code
public function _list_files() {
$files = array();
if ($dir = $this
->get_realpath()) {
if ($handle = @opendir($dir)) {
require_once dirname(__FILE__) . '/files.inc';
while (FALSE !== ($file = readdir($handle))) {
if (substr($file, 0, 1) !== '.') {
$filepath = $dir . "/" . $file;
$files[$file] = new backup_file(array(
'filepath' => $filepath,
));
}
}
}
}
return $files;
}