public function stream_seek($offset, $whence = SEEK_SET)
    {
        if (!$this->handle) {
            return false;
        }
        self::restorePrev();
        $result = \fseek($this->handle, $offset, $whence);
        $success = $result !== -1;
        self::register();
        return $success;
    }