Package manifold.io
Class FilePathComponents
- java.lang.Object
-
- manifold.io.FilePathComponents
-
public class FilePathComponents extends Object
Represents the path to a file as a collection of directories.
-
-
Constructor Summary
Constructors Constructor Description FilePathComponents(File root, List<File> segments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()booleanisRooted()Returnstruewhen therootis not empty.FilePathComponentsnormalize()StringrootName()Returns a string representing the root for this file, or an empty string is this file name is relative.intsize()Returns the number of elements in the path to the file.FilesubPath(int beginIndex, int endIndex)Returns a sub-path of the path, starting with the directory at the specifiedbeginIndexand up to the specifiedendIndex.
-
-
-
Method Detail
-
rootName
public String rootName()
Returns a string representing the root for this file, or an empty string is this file name is relative.
-
isRooted
public boolean isRooted()
Returnstruewhen therootis not empty.
-
size
public int size()
Returns the number of elements in the path to the file.
-
subPath
public File subPath(int beginIndex, int endIndex)
Returns a sub-path of the path, starting with the directory at the specifiedbeginIndexand up to the specifiedendIndex.
-
normalize
public FilePathComponents normalize()
-
-