Class Escape
- java.lang.Object
-
- org.apache.sling.fsprovider.internal.mapper.Escape
-
public final class Escape extends Object
Manages deescaping for platform file names to resource names.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringfileToResourceName(String path)Convert file name to resource name.static StringresourceToFileName(String path)Converts resource name to file name.
-
-
-
Method Detail
-
fileToResourceName
public static String fileToResourceName(String path)
Convert file name to resource name. Applies same rules as Apache Sling JCR ContentLoader.- Parameters:
path- File name or path- Returns:
- Resource name or path
-
resourceToFileName
public static String resourceToFileName(String path)
Converts resource name to file name. Allows all characters, but URL-encodes characters that are in the list ofRESERVED_CHARS.- Parameters:
path- Resource name or path- Returns:
- File name or path
-
-