code: public static final Path transform(Path oldBase, Path newBase, Path path)
      {
          if (!path.startsWith(oldBase))
          {
              throw new IllegalArgumentException(path+" not in "+oldBase);
          }
          return newBase.resolve(oldBase.relativize(path));
      }
docs: Transform path from relative oldBase to newBase.
  <p>
  If oldBase = /a/b and newBase = /q/w/e then path /a/b/c/d will
  transform to /q/w/e/c/d
  @param oldBase
  @param newBase
  @param path
  @return