Back to BufferStreamHandler class

Method seek_end

protected bool
seek_end
(mixed $offset)
Sets the position to the end of the current buffer + offset
Parameters
  • int $offset The offset in bytes
Returns
  • bool

Method seek_end - Source code

/**
 * Sets the position to the end of the current buffer + offset
 *
 * @param   integer  $offset  The offset in bytes
 *
 * @return  boolean
 */
protected function seek_end($offset)
{
    $offset += \strlen($this->buffers[$this->name]);
    if ($offset < 0) {
        return false;
    }
    $this->position = $offset;
    return true;
}