public class CommonPath extends Object
This is the maximal leftmost common part of all paths (when treated in a canonical way).
Modifier and Type | Method and Description |
---|---|
static Optional<Path> |
fromFiles(Collection<File> files)
Finds the common root directory of the paths to several
File s. |
static Optional<Path> |
fromPaths(Iterable<Path> paths)
Finds the common root directory of several
Path s. |
static Optional<Path> |
fromStrings(Collection<String> paths)
Finds the common root directory of several paths, encoded in
String s. |
public static Optional<Path> fromPaths(Iterable<Path> paths)
Path
s.paths
- the pathspublic static Optional<Path> fromStrings(Collection<String> paths)
String
s.paths
- the pathspublic static Optional<Path> fromFiles(Collection<File> files)
File
s.files
- the filesCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.