public static function createFromSplFileInfo(\SplFileInfo $info)
    {
        $realpath = $info->getRealPath();
        if ($info->isFile()) {
            return new fs\entity\FileEntity($realpath);
        }
        return new fs\entity\DirEntity($realpath);
    }