Package org.apache.sling.fsprovider.internal.mapper

# 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

Modifier and Type
Method
Description
`static String`
`fileToResourceName(String path)`
Convert file name to resource name.
`static String`
`resourceToFileName(String path)`
Converts resource name to file name.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### 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 of `RESERVED_CHARS`.

Parameters:
  `path` - Resource name or path
Returns:
  File name or path