Package org.apache.jackrabbit.vault.util
Class PathUtil
- java.lang.Object
-
- org.apache.jackrabbit.vault.util.PathUtil
-
public class PathUtil extends java.lang.Object
PathUtil
...
-
-
Constructor Summary
Constructors Constructor Description PathUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
append(java.lang.String parent, java.lang.String relPath)
static int
getDepth(java.lang.String path)
static java.lang.String
getPath(Node parent, java.lang.String relPath)
static java.io.File
getRelativeFile(java.io.File parent, java.io.File file)
static java.lang.String
getRelativeFilePath(java.lang.String cwd, java.lang.String path)
static java.lang.String
getRelativeFilePath(java.lang.String cwd, java.lang.String path, java.lang.String separator)
static java.lang.String
getRelativePath(java.lang.String parent, java.lang.String path)
static java.lang.String[]
makePath(java.lang.String[] parent, java.lang.String path)
make a canonical path.static java.lang.String
makePath(java.lang.String parent, java.lang.String relPath)
-
-
-
Method Detail
-
makePath
public static java.lang.String[] makePath(java.lang.String[] parent, java.lang.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
-
makePath
public static java.lang.String makePath(java.lang.String parent, java.lang.String relPath)
-
getRelativeFile
public static java.io.File getRelativeFile(java.io.File parent, java.io.File file)
-
getRelativePath
public static java.lang.String getRelativePath(java.lang.String parent, java.lang.String path)
-
getRelativeFilePath
public static java.lang.String getRelativeFilePath(java.lang.String cwd, java.lang.String path)
-
getRelativeFilePath
public static java.lang.String getRelativeFilePath(java.lang.String cwd, java.lang.String path, java.lang.String separator)
-
append
public static java.lang.String append(java.lang.String parent, java.lang.String relPath)
-
getDepth
public static int getDepth(java.lang.String path)
-
getPath
public static java.lang.String getPath(Node parent, java.lang.String relPath) throws RepositoryException
- Throws:
RepositoryException
-
-