public function getSize()
    {
        if (is_null($this->size) === true) {
            $stats = fstat($this->stream);

            $this->size = $stats['size'];
        }

        return $this->size;
    }
public function getSize()
    {
        if (is_null($this->size) === true) {
            $stats = fstat($this->stream);

            $this->size = $stats['size'];
        }

        return $this->size;
    }
Returns the size of the stream if known.

@return integer|null