You are here

protected function SidecarMetadataDestinationTrait::_loadFileMetadataArray in Backup and Migrate 8.4

File

lib/backup_migrate_core/src/Destination/SidecarMetadataDestinationTrait.php, line 23

Class

SidecarMetadataDestinationTrait
Class SidecarMetadataDestinationTrait.

Namespace

BackupMigrate\Core\Destination

Code

protected function _loadFileMetadataArray(BackupFileInterface $file) {
  $info = [];
  $id = $file
    ->getFullName();
  $filename = $id . '.info';
  if ($this
    ->fileExists($filename)) {
    $meta_file = $this
      ->getFile($filename);
    $meta_file = $this
      ->loadFileForReading($meta_file);
    $info = $this
      ->_INIToArray($meta_file
      ->readAll());
  }
  return $info;
}