Class NamedPath

java.lang.Object
com.tccc.kos.commons.path.NamedPath

public class NamedPath extends Object
Data class that provides the link between a logical directory name and its corresponding physical location on the disk. A named "base path" created by PathMgr supports external overrides.

Data Fields

 
  final String name;  // the name given the path (not the actual path itself)
  final File file;    // the file representation of this path
 
 
Since:
1.0
Version:
2022-10-10
See Also:
  • Method Details

    • getName

      public String getName()
      Gets the name of the path.
      Returns:
      the name given this path
    • getFile

      public File getFile()
      Retrieves the File for this path.
      Returns:
      the File for this NamedPath
    • getPath

      public String getPath()
      Returns the full path.
      Returns:
      the full/absolute path for this NamedPath
    • getPath

      public String getPath(String childPath)
      Appends the specified childPath to this NamedPath and then returns the resulting directory path.
      Parameters:
      childPath - path to append
      Returns:
      the appended path
    • getFile

      public File getFile(String childPath)
      Appends the specified childPath to this NamedPath and then returns the resulting File .
      Returns:
      the appended file
    • toString

      public String toString()
      Returns the string representation of this object.
      Overrides:
      toString in class Object
      Returns:
      the string representation