english/libraries/joomla/filesystem/stream.php
/**
	 * Seek the file
	 *
	 * Note: the return value is different to that of fseek
	 *
	 * @param   integer  $offset	Offset to use when seeking
	 * @param   integer  $whence	Seek mode to use
	 *
	 * @return  boolean  True on success, false on failure
	 *
	 * @see http://php.net/manual/en/function.fseek.php
	 * @since   11.1
	 */
Seek the file
Note: the return value is different to that of fseek

@param   integer  $offset    Offset to use when seeking
@param   integer  $whence    Seek mode to use

@return  boolean  True on success, false on failure


Seek the file Note : the return value is different to that of fseek @param integer $offset Offset to use when seeking @param integer $whence Seek mode to use @return boolean True on success false on failure
function seek($offset, $whence=SEEK_SET)
	{
		if (!$this->_fh) {
			$this->setError(JText::_('JLIB_FILESYSTEM_ERROR_STREAMS_FILE_NOT_OPEN'));
			return false;
		}
		$retval = false;
		$php_errormsg = '';
		$track_errors = ini_get('track_errors');
		ini_set('track_errors', true);
		switch($this->processingmethod)
		{
			case 'gz':
				$res = gzseek($this->_fh, $offset, $whence);
				break;
			case 'bz':
			case 'f':
			default:
				$res = fseek($this->_fh, $offset, $whence);
				break;
		}
		if ($res == -1) {
			$this->setError($php_errormsg);
		}
		else {
			$retval = true;
		}
		ini_set('track_errors', $track_errors);
		return $retval;
	}
function seek ( $ offset , $ whence = SEEK_SET ) { if ( ! $ this -> _fh ) { $ this -> setError ( JText :: _ ( 'JLIB_FILESYSTEM_ERROR_STREAMS_FILE_NOT_OPEN' ) ) ; return false ; } $ retval = false ; $ php_errormsg = '' ; $ track_errors = ini_get ( 'track_errors' ) ; ini_set ( 'track_errors' , true ) ; switch ( $ this -> processingmethod ) { case 'gz' : $ res = gzseek ( $ this -> _fh , $ offset , $ whence ) ; break ; case 'bz' : case 'f' : default : $ res = fseek ( $ this -> _fh , $ offset , $ whence ) ; break ; } if ( $ res == - 1 ) { $ this -> setError ( $ php_errormsg ) ; } else { $ retval = true ; } ini_set ( 'track_errors' , $ track_errors ) ; return $ retval ; }
Seek the file
 Note: the return value is different to that of fseek
Seek the file Note : the return value is different to that of fseek
// Capture PHP errors // Seek, interestingly, returns 0 on success or -1 on failure. // Restore error tracking to what it was before // Return the result