public function readAllChunked($cb = null, $chunkcb = null, $pri = EIO_PRI_DEFAULT)
{
$cb = CallbackWrapper::forceWrap($cb);
if (!$this->fd) {
if ($cb) {
$cb($this, false);
}
return false;
}
return $this->statRefresh(function ($file, $stat) use($cb, $chunkcb, $pri) {
if (!$stat) {
$cb($file, false);
return;
}
$offset = 0;
$size = $stat['size'];
eio_read($file->fd, min($file->chunkSize, $size), $offset, $pri, $this->readAllChunkedGenHandler($cb, $chunkcb, $size, $offset, $pri), $file);
}, $pri);
}