function backup_migrate_destination_files::_list_files in Backup and Migrate 8.3
Same name and namespace in other branches
- 8.2 includes/destinations.file.inc \backup_migrate_destination_files::_list_files()
- 6.3 includes/destinations.file.inc \backup_migrate_destination_files::_list_files()
- 7.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 91 - 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_realpath()) {
if ($handle = @opendir($dir)) {
backup_migrate_include('files');
while (FALSE !== ($file = readdir($handle))) {
if (substr($file, 0, 1) !== '.') {
$filepath = $dir . "/" . $file;
$files[$file] = new backup_file(array(
'filepath' => $filepath,
));
}
}
}
}
return $files;
}