private String toConfig(final boolean forEquals) {

        final StringBuilder configString = new StringBuilder(type.toString()).append(CONFIG_SEP);
        switch (type) {
            case PERSISTABLE_FOLDER:
                configString.append(this.persistableFolder.name());
                break;
            case FILE:
            case DOCUMENT:
            default:
                if (forEquals) {
                    configString.append(UriUtils.toCompareString(uri));
                } else {
                    configString.append(uri);
                }
                break;
        }
        //Important: do NOT output getSubdirsToBase() here!
        //For folders based on other folders with subdirs, this woul lead to false reconstruction with doubled up subfolders
        configString.append(CONFIG_SEP).append(this.subfolderString);
        return configString.toString();
    }
returns a config string for this folder fit for reconstructing it using {@link Folder#fromConfig(String)}. This value is ALWAYS immutable even when folder type is volatile
main/src/main/java/cgeo/geocaching/storage/Folder.java