Opis\Closure\ClosureStream::stream_seek PHP Méthode

stream_seek() public méthode

public stream_seek ( $offset, $whence = SEEK_SET )
    public function stream_seek($offset, $whence = SEEK_SET)
    {
        $crt = $this->pointer;
        switch ($whence) {
            case SEEK_SET:
                $this->pointer = $offset;
                break;
            case SEEK_CUR:
                $this->pointer += $offset;
                break;
            case SEEK_END:
                $this->pointer = $this->length + $offset;
                break;
        }
        if ($this->pointer < 0 || $this->pointer >= $this->length) {
            $this->pointer = $crt;
            return false;
        }
        return true;
    }