function _backup_migrate_file_info in Backup and Migrate 6
Same name and namespace in other branches
- 5 backup_migrate.module \_backup_migrate_file_info()
Get the basic info for a backup file on the server.
3 calls to _backup_migrate_file_info()
- backup_migrate_file_download in ./
backup_migrate.module - Implementation of hook_file_download.()
- _backup_migrate_list_files in ./
backup_migrate.module - List the previously created backup files.
- _backup_migrate_remove_expired_backups in ./
backup_migrate.module - Remove older backups keeping only the number specified by the aministrator.
File
- ./
backup_migrate.module, line 857 - Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (f.e. cache_*)
Code
function _backup_migrate_file_info($path) {
$types = _backup_migrate_filetypes();
foreach ($types as $type) {
$extlen = drupal_strlen($type['extension']);
if (drupal_substr($path, -$extlen, $extlen) === $type['extension']) {
$out = $type;
$out['filesize'] = filesize($path);
$out['filename'] = basename($path);
$out['filemtime'] = filemtime($path);
$out['filectime'] = filectime($path);
$out['filepath'] = $path;
return $out;
}
}
return NULL;
}