List of usage examples for org.apache.hadoop.fs Path mergePaths
public static Path mergePaths(Path path1, Path path2)
From source file:org.shaf.core.io.Location.java
License:Apache License
/** * Returns the absolute path to this location, which combines base and * relative paths./* ww w . j ava 2 s . c om*/ * * @return the absolute path to this location. */ private final Path getAbsolutePath() { return Path.mergePaths(base, path); }
From source file:org.shaf.core.io.Location.java
License:Apache License
/** * Resolve the given path against this location. * //from w w w . j av a 2 s.c o m * @param others * the paths to resolve against this location. * @return the location with resulting path. */ public final Location resolve(final Path... others) { Path rel = this.path; for (Path other : others) { if (other.isAbsolute()) { rel = Path.mergePaths(rel, other); } else { rel = Path.mergePaths(rel, new Path("/", other)); } } return new Location(this.fs, this.base, rel, this.filter); }