private static File getAppDir(String par0Str) {
        String s = System.getProperty("user.home", ".");
        File file;

        switch (EnumOSMappingHelper.enumOSMappingArray[getOS().ordinal()]) {
            case 1:
            case 2:
                file = new File(s, (new StringBuilder()).append('.')
                        .append(par0Str).append('/').toString());
                break;

            case 3:
                String s1 = System.getenv("APPDATA");

                if (s1 != null) {
                    file = new File(s1, (new StringBuilder()).append(".")
                            .append(par0Str).append('/').toString());
                } else {
                    file = new File(s, (new StringBuilder()).append('.')
                            .append(par0Str).append('/').toString());
                }

                break;

            case 4:
                file = new File(s, (new StringBuilder())
                        .append("Library/Application Support/").append(par0Str)
                        .toString());
                break;

            default:
                file = new File(s, (new StringBuilder()).append(par0Str)
                        .append('/').toString());
                break;
        }

        if (!file.exists() && !file.mkdirs()) {
            throw new GameException(new ErrorCode006());
        } else {
            return file;
        }
    }