public static function recScandir($directory)
    {
        $arr = [];
        foreach (scandir($directory) as $f) {
            if ($f == '.' || $f == '..') {
                continue;
            } elseif (is_dir($directory . '/' . $f)) {
                $arr[$f] = self::recScandir($directory . '/' . $f);
            } else {
                $arr[$f] = 'file';
            }
        }
        return $arr;
    }