static PathMapping create()

in src/main/java/org/apache/sling/bundleresource/impl/PathMapping.java [56:68]


    static PathMapping create(final String configPath, final String expandDirective) {
        String resourceRoot;
        String entryRoot;
        int prefixSep = configPath.indexOf(prefixSeparatorChar);
        if (prefixSep >= 0) {
            entryRoot = configPath.substring(prefixSep + 1);
            resourceRoot = configPath.substring(0, prefixSep).concat(entryRoot);
        } else {
            resourceRoot = configPath;
            entryRoot = null;
        }
        return new PathMapping(resourceRoot, entryRoot, expandDirective);
    }