src/Stream.php
public function getSize()
	{
		if (!isset($this->resource)) {
			return null;
		}

		if ($this->getMetadata('uri')) {
			clearstatcache(true, $this->getMetadata('uri'));
		}

		$stats = fstat($this->resource);

		return isset($stats['size']) ? $stats['size'] : null;
	}
public function getSize()
	{
		if (!isset($this->resource)) {
			return null;
		}

		if ($this->getMetadata('uri')) {
			clearstatcache(true, $this->getMetadata('uri'));
		}

		$stats = fstat($this->resource);

		return isset($stats['size']) ? $stats['size'] : null;
	}
{@inheritdoc}