WordPress\AiClientDependencies\Nyholm\Psr7
Stream::getSize
Method of the class: Stream{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Stream = new Stream(); $Stream->getSize(): ?int;
Stream::getSize() Stream::getSize code WP 7.0
public function getSize(): ?int
{
if (null !== $this->size) {
return $this->size;
}
if (!isset($this->stream)) {
return null;
}
// Clear the stat cache if the stream has a URI
if ($uri = $this->getUri()) {
\clearstatcache(\true, $uri);
}
$stats = \fstat($this->stream);
if (isset($stats['size'])) {
$this->size = $stats['size'];
return $this->size;
}
return null;
}