original_string: protected function extract_file_to_dir($source) {
          global $USER;
  
          $this->filepath = restore_controller::get_tempdir_name($this->contextid, $USER->id);
          $backuptempdir = make_backup_temp_directory('', false);
  
          $fb = get_file_packer('application/vnd.moodle.backup');
          $result = $fb->extract_to_pathname($source,
                  $backuptempdir . '/' . $this->filepath . '/', null, $this);
  
          // If any progress happened, end it.
          if ($this->startedprogress) {
              $this->get_progress_reporter()->end_progress();
          }
          return $result;
      }
code: protected function extract_file_to_dir($source) {
          global $USER;
  
          $this->filepath = restore_controller::get_tempdir_name($this->contextid, $USER->id);
          $backuptempdir = make_backup_temp_directory('', false);
  
          $fb = get_file_packer('application/vnd.moodle.backup');
          $result = $fb->extract_to_pathname($source,
                  $backuptempdir . '/' . $this->filepath . '/', null, $this);
  
          // If any progress happened, end it.
          if ($this->startedprogress) {
              $this->get_progress_reporter()->end_progress();
          }
          return $result;
      }
code_tokens: protected function extract_file_to_dir ( $ source ) { global $ USER ; $ this -> filepath = restore_controller :: get_tempdir_name ( $ this -> contextid , $ USER -> id ) ; $ backuptempdir = make_backup_temp_directory ( '' , false ) ; $ fb = get_file_packer ( 'application/vnd.moodle.backup' ) ; $ result = $ fb -> extract_to_pathname ( $ source , $ backuptempdir . '/' . $ this -> filepath . '/' , null , $ this ) ; // If any progress happened, end it. if ( $ this -> startedprogress ) { $ this -> get_progress_reporter ( ) -> end_progress ( ) ; } return $ result ; }
docstring: Extracts the file.
  
  @param string|stored_file $source Archive file to extract
  @return bool
docstring_tokens: Extracts the file .