|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.fs.FileSystemPathUtil
public final class FileSystemPathUtil
Utility class for handling paths in a file system.
| Field Summary | |
|---|---|
static BitSet |
SAFE_NAMECHARS
The list of characters that are not encoded by the escapeName(String)
and unescape(String) methods. |
static BitSet |
SAFE_PATHCHARS
The list of characters that are not encoded by the escapePath(String)
and unescape(String) methods. |
| Method Summary | |
|---|---|
static void |
checkFormat(String path)
Checks if path is a valid path. |
static boolean |
denotesRoot(String path)
Tests whether the specified path represents the root path, i.e. |
static String |
escapeName(String name)
Encodes the specified name. |
static String |
escapePath(String path)
Encodes the specified path. |
static String |
getName(String path)
Returns the name of the specified path. |
static String |
getParentDir(String path)
Returns the parent directory of the specified path. |
static String |
unescape(String pathOrName)
Decodes the specified path/name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final BitSet SAFE_NAMECHARS
escapeName(String)
and unescape(String) methods. They contains the characters
which can safely be used in file names:
public static final BitSet SAFE_PATHCHARS
escapePath(String)
and unescape(String) methods. They contains the characters
which can safely be used in file paths:
| Method Detail |
|---|
public static String escapePath(String path)
path. Same as
escapeName(String) except that the separator
character / is regarded as a legal path character
that needs no escaping.
path - the path to encode.
public static String escapeName(String name)
name. Same as
escapePath(String) except that the separator character
/ is regarded as an illegal character that needs
escaping.
name - the name to encode.
public static String unescape(String pathOrName)
pathOrName - the escaped path/name
public static boolean denotesRoot(String path)
path - path to test
public static void checkFormat(String path)
throws FileSystemException
path is a valid path.
path - the path to be checked
FileSystemException - If path is not a valid pathpublic static String getParentDir(String path)
path.
path - a file system path denoting a directory or a file.
public static String getName(String path)
path.
path - a file system path denoting a directory or a file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||