public function setOffset($offset)
    {
        $this->checkStreamAvailable();
        fseek($this->fileDescriptor, $offset < 0 ? $this->getSize() + $offset : $offset);
    }
public function setOffset($offset)
    {
        $this->checkStreamAvailable();
        fseek($this->fileDescriptor, $offset < 0 ? $this->getSize() + $offset : $offset);
    }
public function setOffset ( $ offset ) { $ this -> checkStreamAvailable ( ) ; fseek ( $ this -> fileDescriptor , $ offset < 0 ? $ this -> getSize ( ) + $ offset : $ offset ) ; }
Sets the point of operation, ie the cursor offset value. The offset may
also be set to a negative value when it is interpreted as an offset from
the end of the stream instead of the beginning.

@param integer $offset The new point of operation.
@return void
@throws InvalidStreamException if an I/O error occurs
Sets the point of operation ie the cursor offset value . The offset may also be set to a negative value when it is interpreted as an offset from the end of the stream instead of the beginning .