Get the size of the stream if known.

@return int|null Returns the size in bytes if known, or null if unknown.
431445
function getSize()
    {
        if (!$this->_assertUsable())
            return null;

        $size  = null;
        if ($uri = $this->getMetadata('uri'))
            ## clear the stat cache of stream URI
            clearstatcache(true, $uri);

        $stats = fstat($this->rHandler);
        if (isset($stats['size']))
            $size = $stats['size'];

        return $size;
    }
1174754
public function filesize()
	{
		if ($this->use_include_path) {
			return filesize(stream_resolve_include_path($this->_fhandle));
		} else {
			return filesize($this->_fhandle);
		}
	}
745240
public function getContentLength(): ?int
    {
        $result = $this->serverRequest->getHeader('Content-Length');
        return $result ? (int) $result[0] : null;
    }
739057
public int getSize()
  {
    int size = length();
    
    if (_blobs == null) {
      return size;
    }
    
    for (BlobOutputStream blob : _blobs) {
      if (blob != null) {
        size += blob.getSize();
      }
    }
    
    return size;
  }
831338
public function getLength()
        {
        	if(!$this->_hasGetLen) {
        		$this->_hasGetLen = true;
		        $this->_length = $this->_redis->llen($this->_key);
	        }
                return $this->_length;
        }
188184
public function getFormattedSize()
    {
        if ($this->size < 1024) {
            return $this->size.' B';
        } elseif ($this->size < 1048576) {
            return round($this->size / 1024, 2).' KB';
        } elseif ($this->size < 1073741824) {
            return round($this->size / 1048576, 2).' MB';
        } elseif ($this->size < 1099511627776) {
            return round($this->size / 1073741824, 2).' GB';
        }

        return round($this->size / 1099511627776, 2).' TB';
    }
962297
public function getSize(): int
    {
        if ($this->caching == false) {
            return filesize($this->getAbsoluteFilePath());
        }

        if ($this->size == null) {
            $this->size = filesize($this->getAbsoluteFilePath());
        }

        return $this->size;
    }
791878
protected function getSizeInfo()
	{
		$size = array();
		// since we check $i + 1 we need to stop one step earlier
		$this->dataLength = strlen($this->data) - 1;

		$sofStartRead = true;

		// Look through file for SOF marker
		for ($i = 2; $i < $this->dataLength; $i++)
		{
			$marker = $this->getNextMarker($i, $sofStartRead);

			if (in_array($marker, $this->sofMarkers))
			{
				// Extract size info from SOF marker
				return $this->extractSizeInfo($i);
			}
			else
			{
				// Extract length only
				$markerLength = $this->extractMarkerLength($i);

				if ($markerLength < 2)
				{
					return $size;
				}

				$i += $markerLength - 1;
				continue;
			}
		}

		return $size;
	}
487175
public function getSize()
    {
        if (!$this->size && $this->isAttached() === true) {
            if (!\is_resource($this->stream)) {
                throw new \TypeError();
            }
            $stats = \fstat($this->stream);
            /** @var int|null size */
            $this->size = isset($stats['size']) && !$this->isPipe() ? (int) $stats['size'] : null;
        }

        return $this->size;
    }
112938
public function getContentLength(): ?int
    {
        $result = $this->getRequest()->getHeader('Content-Length');

        return $result ? (int) $result[0] : null;
    }
972279
public function getLength()
	{
		if ($this->length == null) {
			$this->requestHead();
		}
		if ($this->length == null) {
			$this->requestBody();
		}
		return $this->length;
	}
408604
public function size()
    {
        eZDebugSetting::writeDebug( 'kernel-clustering', "dfs::size()" );
        return isset( $this->metaData['size'] ) ? (int)$this->metaData['size'] : null;
    }
965534
public function length($length = null)
    {
        if (!is_null($length)) {
            $this->length = (int) $length;
        }

        return $this->length;
    }
154164
def get_size(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if self._uncompressed_stream_size is None:
      self._uncompressed_stream_size = self._GetUncompressedStreamSize()

    return self._uncompressed_stream_size
1014605
public function getFileSize()
    {
        $oFile = oxNew(\OxidEsales\Eshop\Application\Model\File::class);
        $oFile->load($this->oxorderfiles__oxfileid->value);

        return $oFile->getSize();
    }
1285600
public function size(): int {
        if ($this->tail > $this->head) return 0;
        return $this->head - $this->tail;
    }
986560
public function getWidth()
    {
      if ($this->width != null) {
        return $this->width;
      }

      list($width) = getimagesize($this->_files['tmp_name']);

      return $width;
    }