original_string: public function init() {
          global $CFG, $USER;
  
          if (!empty($this->_fp)) {
              $this->close();
          }
          $filename = $CFG->tempdir.'/csvimport/'.$this->_type.'/'.$USER->id.'/'.$this->_iid;
          if (!file_exists($filename)) {
              return false;
          }
          if (!$this->_fp = fopen($filename, "r")) {
              return false;
          }
          //skip header
          return (fgetcsv($this->_fp) !== false);
      }
code: public function init() {
          global $CFG, $USER;
  
          if (!empty($this->_fp)) {
              $this->close();
          }
          $filename = $CFG->tempdir.'/csvimport/'.$this->_type.'/'.$USER->id.'/'.$this->_iid;
          if (!file_exists($filename)) {
              return false;
          }
          if (!$this->_fp = fopen($filename, "r")) {
              return false;
          }
          //skip header
          return (fgetcsv($this->_fp) !== false);
      }
code_tokens: public function init ( ) { global $ CFG , $ USER ; if ( ! empty ( $ this -> _fp ) ) { $ this -> close ( ) ; } $ filename = $ CFG -> tempdir . '/csvimport/' . $ this -> _type . '/' . $ USER -> id . '/' . $ this -> _iid ; if ( ! file_exists ( $ filename ) ) { return false ; } if ( ! $ this -> _fp = fopen ( $ filename , "r" ) ) { return false ; } //skip header return ( fgetcsv ( $ this -> _fp ) !== false ) ; }
docstring: Init iterator.
  
  @global object
  @global object
  @return bool Success
docstring_tokens: Init iterator .