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 severalFiles.Finds the common root directory of severalPaths.fromStrings(Collection<String> paths) Finds the common root directory of several paths, encoded inStrings.
-
Method Details
-
fromPaths
Finds the common root directory of severalPaths.- Parameters:
paths- the paths- Returns:
- the common root directory, if it exists.
-
fromStrings
Finds the common root directory of several paths, encoded inStrings.- Parameters:
paths- the paths- Returns:
- the common root directory, if it exists.
-
fromFiles
Finds the common root directory of the paths to severalFiles.- Parameters:
files- the files- Returns:
- the common root directory, if it exists.
-