Package org.apache.derby.impl.io.vfmem
Class PathUtil
- java.lang.Object
-
- org.apache.derby.impl.io.vfmem.PathUtil
-
public class PathUtil extends java.lang.ObjectHelper methods to deal with paths in the in-memory "file system".These methods are similar to those in
java.io.File.Note: The system has been hardcoded to use the separator specified by
java.io.File.
-
-
Constructor Summary
Constructors Modifier Constructor Description privatePathUtil()This class cannot be instantiated.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidbasicPathChecks(java.lang.String path)static java.lang.StringgetBaseName(java.lang.String path)Returns the base name of the path.static java.lang.StringgetParent(java.lang.String path)Returns the parent of the path.static java.lang.Stringjoin(java.lang.String parent, java.lang.String base)Joins the two paths by inserting the separator chararcter between them.
-
-
-
Method Detail
-
basicPathChecks
private static void basicPathChecks(java.lang.String path)
-
getBaseName
public static java.lang.String getBaseName(java.lang.String path)
Returns the base name of the path.- Parameters:
path- the path to process- Returns:
- The base name of the path.
-
getParent
public static java.lang.String getParent(java.lang.String path)
Returns the parent of the path.- Parameters:
path- the path to process- Returns:
- The parent path, which may be the empty string (
"") if the path is a relative path, ornullif XXXX TODO
-
join
public static java.lang.String join(java.lang.String parent, java.lang.String base)Joins the two paths by inserting the separator chararcter between them.- Parameters:
parent- parent directorybase- file/directory name- Returns:
- A merged path.
-
-