public static function readfile($path, $cb, $pri = EIO_PRI_DEFAULT)
{
$cb = CallbackWrapper::forceWrap($cb);
if (!FileSystem::$supported) {
$cb($path, file_get_contents($path));
return true;
}
return FileSystem::open($path, 'r!', function ($file) use($path, $cb, $pri) {
if (!$file) {
$cb($path, false);
return;
}
$file->readAll($cb, $pri);
}, null, $pri);
}