API15:JBuffer/stream seek
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Description:JBuffer/stream seek
Contents |
Syntax
stream_seek($offset, $whence)
| Parameter Name | Default Value | Description |
|---|---|---|
| $offset | ||
| $whence |
Defined in
libraries/joomla/utilities/buffer.php
Importing
jimport( 'joomla.utilities.buffer' );
Source Body
function stream_seek($offset, $whence) { switch ($whence) { case SEEK_SET : if ($offset < strlen($this->_buffers[$this->name]) && $offset >= 0) { $this->position = $offset; return true; } else { return false; } break; case SEEK_CUR : if ($offset >= 0) { $this->position += $offset; return true; } else { return false; } break; case SEEK_END : if (strlen($this->_buffers[$this->name]) + $offset >= 0) { $this->position = strlen($this->_buffers[$this->name]) + $offset; return true; } else { return false; } break; default : return false; } }
[Edit See Also] SeeAlso:JBuffer/stream seek
Examples
<CodeExamplesForm />
