Package org.apache.jackrabbit.vault.util
Class PathUtil
- java.lang.Object
-
- org.apache.jackrabbit.vault.util.PathUtil
-
public class PathUtil extends Object
PathUtil
...
-
-
Constructor Summary
Constructors Constructor Description PathUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
append(String parent, String relPath)
static int
getDepth(String path)
static String
getPath(Node parent, String relPath)
static File
getRelativeFile(File parent, File file)
static String
getRelativeFilePath(String cwd, String path)
static String
getRelativeFilePath(String cwd, String path, String separator)
static String
getRelativePath(String parent, String path)
static String[]
makePath(String[] parent, String path)
make a canonical path.static String
makePath(String parent, String relPath)
-
-
-
Method Detail
-
makePath
public static String[] makePath(String[] parent, String path)
make a canonical path. removes all /./ and /../ and multiple slashes.- Parameters:
parent
- the parent path (can benull
)path
- the path to resolve- Returns:
- the canonicalized path
-
getRelativeFilePath
public static String getRelativeFilePath(String cwd, String path, String separator)
-
getDepth
public static int getDepth(String path)
-
getPath
public static String getPath(Node parent, String relPath) throws RepositoryException
- Throws:
RepositoryException
-
-