public function statvfs($cb, $pri = EIO_PRI_DEFAULT)
{
$cb = CallbackWrapper::forceWrap($cb);
if (!$this->fd) {
if ($cb) {
$cb($this, false);
}
return false;
}
if (!FileSystem::$supported) {
if ($cb) {
$cb($this, false);
}
return false;
}
if ($this->statvfs) {
$cb($this, $this->statvfs);
return true;
}
return eio_fstatvfs($this->fd, $pri, function ($file, $stat) use($cb) {
$file->statvfs = $stat;
$cb($file, $stat);
}, $this);
}