Class CommonPath
Object
CommonPath
Finds the common root directory of a set of paths.
This is the maximal leftmost common part of all paths (when treated in a canonical way).
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionfromFiles
(Collection<File> files) Finds the common root directory of the paths to severalFile
s.Finds the common root directory of severalPath
s.fromStrings
(Collection<String> paths) Finds the common root directory of several paths, encoded inString
s.
-
Method Details
-
fromPaths
Finds the common root directory of severalPath
s.- Parameters:
paths
- the paths- Returns:
- the common root directory, if it exists.
-
fromStrings
Finds the common root directory of several paths, encoded inString
s.- Parameters:
paths
- the paths- Returns:
- the common root directory, if it exists.
-
fromFiles
Finds the common root directory of the paths to severalFile
s.- Parameters:
files
- the files- Returns:
- the common root directory, if it exists.
-