public static statPrepare ( mixed $stat ) : array | ||
$stat | mixed | Data |
return | array | hash |
public static function statPrepare($stat)
{
if ($stat === -1 || !$stat) {
return -1;
}
$stat['type'] = FileSystem::$modeTypes[$stat['mode'] & 0170000];
return $stat;
}
/** * lstat() * @param string $path Path * @param callable $cb Callback * @param integer $pri Priority * @return resource|true */ public static function lstat($path, $cb, $pri = EIO_PRI_DEFAULT) { $cb = CallbackWrapper::forceWrap($cb); if (!self::$supported) { call_user_func($cb, $path, FileSystem::statPrepare(lstat($path))); return true; } return eio_lstat($path, $pri, function ($path, $stat) use($cb) { call_user_func($cb, $path, FileSystem::statPrepare($stat)); }, $path); }