WordPress\AiClientDependencies\Nyholm\Psr7

Stream::seek │ public │ WP 1.0

Метод класса: Stream{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Stream = new Stream();
$Stream->seek( $offset, $whence ): void;
$offset(обязательный)
.
$whence
.
По умолчанию: \SEEK_SET

Код Stream::seek() WP 7.1.2

public function seek($offset, $whence = \SEEK_SET): void
{
    if (!isset($this->stream)) {
        throw new \RuntimeException('Stream is detached');
    }
    if (!$this->seekable) {
        throw new \RuntimeException('Stream is not seekable');
    }
    if (-1 === \fseek($this->stream, $offset, $whence)) {
        throw new \RuntimeException('Unable to seek to stream position "' . $offset . '" with whence ' . \var_export($whence, \true));
    }
}