original_string: public function process() {
          $backuptempdir = make_backup_temp_directory('');
          if ($this->filename) {
              $archivepath = $backuptempdir . '/' . $this->filename;
              if (!file_exists($archivepath)) {
                  throw new restore_ui_exception('invalidrestorefile');
              }
              $outcome = $this->extract_file_to_dir($archivepath);
              if ($outcome) {
                  fulldelete($archivepath);
              }
          } else {
              $fs = get_file_storage();
              $storedfile = $fs->get_file_by_hash($this->pathnamehash);
              if (!$storedfile || $storedfile->get_contenthash() !== $this->contenthash) {
                  throw new restore_ui_exception('invalidrestorefile');
              }
              $outcome = $this->extract_file_to_dir($storedfile);
          }
          return $outcome;
      }
code: public function process() {
          $backuptempdir = make_backup_temp_directory('');
          if ($this->filename) {
              $archivepath = $backuptempdir . '/' . $this->filename;
              if (!file_exists($archivepath)) {
                  throw new restore_ui_exception('invalidrestorefile');
              }
              $outcome = $this->extract_file_to_dir($archivepath);
              if ($outcome) {
                  fulldelete($archivepath);
              }
          } else {
              $fs = get_file_storage();
              $storedfile = $fs->get_file_by_hash($this->pathnamehash);
              if (!$storedfile || $storedfile->get_contenthash() !== $this->contenthash) {
                  throw new restore_ui_exception('invalidrestorefile');
              }
              $outcome = $this->extract_file_to_dir($storedfile);
          }
          return $outcome;
      }
code_tokens: public function process ( ) { $ backuptempdir = make_backup_temp_directory ( '' ) ; if ( $ this -> filename ) { $ archivepath = $ backuptempdir . '/' . $ this -> filename ; if ( ! file_exists ( $ archivepath ) ) { throw new restore_ui_exception ( 'invalidrestorefile' ) ; } $ outcome = $ this -> extract_file_to_dir ( $ archivepath ) ; if ( $ outcome ) { fulldelete ( $ archivepath ) ; } } else { $ fs = get_file_storage ( ) ; $ storedfile = $ fs -> get_file_by_hash ( $ this -> pathnamehash ) ; if ( ! $ storedfile || $ storedfile -> get_contenthash ( ) !== $ this -> contenthash ) { throw new restore_ui_exception ( 'invalidrestorefile' ) ; } $ outcome = $ this -> extract_file_to_dir ( $ storedfile ) ; } return $ outcome ; }
docstring: Processes this restore stage
  @return bool
  @throws restore_ui_exception
docstring_tokens: Processes this restore stage