public function getLength()
{
// @TODO Implement non-blocking php-uv file size retrieval.
// For now we'll just use the dumb blocking version.
// v1.0.0 cannot be a thing until this is implemented.
$size = @filesize($this->path);
if ($size === false) {
return new Failure(new \RuntimeException(sprintf('Could not determine file size for FileBody: %s', $this->path)));
}
return new Success($size);
}