Class PathUtil

java.lang.Object
org.apache.derby.impl.io.vfmem.PathUtil

public class PathUtil extends Object
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 Details

    • SEP

      public static final char SEP
    • SEP_STR

      public static final String SEP_STR
  • Constructor Details

    • PathUtil

      private PathUtil()
      This class cannot be instantiated.
  • Method Details

    • basicPathChecks

      private static void basicPathChecks(String path)
    • getBaseName

      public static String getBaseName(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 String getParent(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, or null if XXXX TODO
    • join

      public static String join(String parent, String base)
      Joins the two paths by inserting the separator chararcter between them.
      Parameters:
      parent - parent directory
      base - file/directory name
      Returns:
      A merged path.