protected static String getFolder(String name) {
        int idx = name.lastIndexOf('/');
        if (idx <= 0 || idx == name.length() - 1) {
            return "";
        } else {
            return name.substring(0, idx + 1);
        }
    }
<code>AssetKey</code> is a key that is used to
look up a resource from a cache.
This class should be immutable.
jme3-core/src/main/java/com/jme3/asset/AssetKey.java