protected function SidecarMetadataDestinationTrait::_saveFileMetadata in Backup and Migrate 8.4
1 call to SidecarMetadataDestinationTrait::_saveFileMetadata()
- DirectoryDestination::saveFile in lib/
backup_migrate_core/ src/ Destination/ DirectoryDestination.php - Save a file to the destination.
File
- lib/
backup_migrate_core/ src/ Destination/ SidecarMetadataDestinationTrait.php, line 39
Class
- SidecarMetadataDestinationTrait
- Class SidecarMetadataDestinationTrait.
Namespace
BackupMigrate\Core\DestinationCode
protected function _saveFileMetadata(BackupFileInterface $file) {
// Get the file metadata and convert to INI format.
$meta = $file
->getMetaAll();
$ini = $this
->_arrayToINI($meta);
// Create an info file.
$meta_file = $this
->getTempFileManager()
->pushExt($file, 'info');
$meta_file
->write($ini);
// Save the metadata.
$this
->_saveFile($meta_file);
}