Package com.tccc.kos.commons.path
Class NamedPath
java.lang.Object
com.tccc.kos.commons.path.NamedPath
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 Summary
Modifier and TypeMethodDescriptiongetFile()
Retrieves the File for this path.Appends the specifiedchildPath
to thisNamedPath
and then returns the resultingFile
.getName()
Gets the name of the path.getPath()
Returns the full path.Appends the specifiedchildPath
to thisNamedPath
and then returns the resulting directory path.toString()
Returns the string representation of this object.
-
Method Details
-
getName
Gets the name of the path.- Returns:
- the name given this path
-
getFile
Retrieves the File for this path.- Returns:
- the
File
for thisNamedPath
-
getPath
Returns the full path.- Returns:
- the full/absolute path for this
NamedPath
-
getPath
Appends the specifiedchildPath
to thisNamedPath
and then returns the resulting directory path.- Parameters:
childPath
- path to append- Returns:
- the appended path
-
getFile
Appends the specifiedchildPath
to thisNamedPath
and then returns the resultingFile
.- Returns:
- the appended file
-
toString
Returns the string representation of this object.
-