public function Stream::getSize in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-diactoros/src/Stream.php \Zend\Diactoros\Stream::getSize()
- 8 vendor/guzzlehttp/psr7/src/Stream.php \GuzzleHttp\Psr7\Stream::getSize()
- 8 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Stream::getSize()
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-diactoros/src/Stream.php \Zend\Diactoros\Stream::getSize()
Get the size of the stream if known.
Return value
int|null Returns the size in bytes if known, or null if unknown.
Overrides StreamInterface::getSize
File
- vendor/
zendframework/ zend-diactoros/ src/ Stream.php, line 98
Class
- Stream
- Implementation of PSR HTTP streams
Namespace
Zend\DiactorosCode
public function getSize() {
if (null === $this->resource) {
return null;
}
$stats = fstat($this->resource);
return $stats['size'];
}