Package org.apache.derby.impl.io.vfmem
Class PathUtil
java.lang.Object
org.apache.derby.impl.io.vfmem.PathUtil
Helper 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
.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
basicPathChecks
(String path) static String
getBaseName
(String path) Returns the base name of the path.static String
Returns the parent of the path.static String
Joins the two paths by inserting the separator chararcter between them.
-
Field Details
-
SEP
public static final char SEP -
SEP_STR
-
-
Constructor Details
-
PathUtil
private PathUtil()This class cannot be instantiated.
-
-
Method Details
-
basicPathChecks
-
getBaseName
Returns the base name of the path.- Parameters:
path
- the path to process- Returns:
- The base name of the path.
-
getParent
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, ornull
if XXXX TODO
-
join
Joins the two paths by inserting the separator chararcter between them.- Parameters:
parent
- parent directorybase
- file/directory name- Returns:
- A merged path.
-