function _backup_migrate_file_info in Backup and Migrate 5
Same name and namespace in other branches
- 6 backup_migrate.module \_backup_migrate_file_info()
Get the basic info for a backup file on the server.
5 calls to _backup_migrate_file_info()
- BackupMigrateUnitTest::testFileDownloadHook in tests/
BackupMigrateUnitTest.test - BackupMigrateUnitTest::testGetFileInfo in tests/
BackupMigrateUnitTest.test - 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 877 - 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;
}