original_string: public static function get_backup_information_from_mbz($filepath, file_progress $progress = null) {
          global $CFG;
          if (!is_readable($filepath)) {
              throw new backup_helper_exception('missing_moodle_backup_file', $filepath);
          }
  
          // Extract moodle_backup.xml.
          $tmpname = 'info_from_mbz_' . time() . '_' . random_string(4);
          $tmpdir = make_backup_temp_directory($tmpname);
          $fp = get_file_packer('application/vnd.moodle.backup');
  
          $extracted = $fp->extract_to_pathname($filepath, $tmpdir, array('moodle_backup.xml'), $progress);
          $moodlefile =  $tmpdir . '/' . 'moodle_backup.xml';
          if (!$extracted || !is_readable($moodlefile)) {
              throw new backup_helper_exception('missing_moodle_backup_xml_file', $moodlefile);
          }
  
          // Read the information and delete the temporary directory.
          $info = self::get_backup_information($tmpname);
          remove_dir($tmpdir);
          return $info;
      }
code: public static function get_backup_information_from_mbz($filepath, file_progress $progress = null) {
          global $CFG;
          if (!is_readable($filepath)) {
              throw new backup_helper_exception('missing_moodle_backup_file', $filepath);
          }
  
          // Extract moodle_backup.xml.
          $tmpname = 'info_from_mbz_' . time() . '_' . random_string(4);
          $tmpdir = make_backup_temp_directory($tmpname);
          $fp = get_file_packer('application/vnd.moodle.backup');
  
          $extracted = $fp->extract_to_pathname($filepath, $tmpdir, array('moodle_backup.xml'), $progress);
          $moodlefile =  $tmpdir . '/' . 'moodle_backup.xml';
          if (!$extracted || !is_readable($moodlefile)) {
              throw new backup_helper_exception('missing_moodle_backup_xml_file', $moodlefile);
          }
  
          // Read the information and delete the temporary directory.
          $info = self::get_backup_information($tmpname);
          remove_dir($tmpdir);
          return $info;
      }
code_tokens: public static function get_backup_information_from_mbz ( $ filepath , file_progress $ progress = null ) { global $ CFG ; if ( ! is_readable ( $ filepath ) ) { throw new backup_helper_exception ( 'missing_moodle_backup_file' , $ filepath ) ; } // Extract moodle_backup.xml. $ tmpname = 'info_from_mbz_' . time ( ) . '_' . random_string ( 4 ) ; $ tmpdir = make_backup_temp_directory ( $ tmpname ) ; $ fp = get_file_packer ( 'application/vnd.moodle.backup' ) ; $ extracted = $ fp -> extract_to_pathname ( $ filepath , $ tmpdir , array ( 'moodle_backup.xml' ) , $ progress ) ; $ moodlefile = $ tmpdir . '/' . 'moodle_backup.xml' ; if ( ! $ extracted || ! is_readable ( $ moodlefile ) ) { throw new backup_helper_exception ( 'missing_moodle_backup_xml_file' , $ moodlefile ) ; } // Read the information and delete the temporary directory. $ info = self :: get_backup_information ( $ tmpname ) ; remove_dir ( $ tmpdir ) ; return $ info ; }
docstring: Load and format all the needed information from a backup file.
  
  This will only extract the moodle_backup.xml file from an MBZ
  file and then call {@link self::get_backup_information()}.
  
  This can be a long-running (multi-minute) operation for large backups.
  Pass a $progress value to receive progress updates.
  
  @param string $filepath absolute path to the MBZ file.
  @param file_progress $progress Progress updates
  @return stdClass containing information.
  @since Moodle 2.4
docstring_tokens: Load and format all the needed information from a backup file .