function DirectoryDestination::_saveFile in Backup and Migrate 8.4
Do the actual file save. This function is called to save the data file AND the metadata sidecar file.
Parameters
\BackupMigrate\Core\File\BackupFileReadableInterface $file:
Throws
\BackupMigrate\Core\Exception\BackupMigrateException
Overrides DestinationBase::_saveFile
1 call to DirectoryDestination::_saveFile()
- DirectoryDestination::saveFile in lib/
backup_migrate_core/ src/ Destination/ DirectoryDestination.php - Save a file to the destination.
1 method overrides DirectoryDestination::_saveFile()
- DrupalDirectoryDestination::_saveFile in src/
Destination/ DrupalDirectoryDestination.php - Do the actual file save. This function is called to save the data file AND the metadata sidecar file.
File
- lib/
backup_migrate_core/ src/ Destination/ DirectoryDestination.php, line 66
Class
- DirectoryDestination
- Class ServerDirectoryDestination.
Namespace
BackupMigrate\Core\DestinationCode
function _saveFile(BackupFileReadableInterface $file) {
// Check if the directory exists.
$this
->checkDirectory();
copy($file
->realpath(), $this
->_idToPath($file
->getFullName()));
// @TODO: use copy/unlink if the temp file and the destination do not share a stream wrapper.
}