code: private Path archivePath(Path p) {
      Path retPath = null;
      Path tmp = p;
      for (int i=0; i< p.depth(); i++) {
        if (tmp.toString().endsWith(".har")) {
          retPath = tmp;
          break;
        }
        tmp = tmp.getParent();
      }
      return retPath;
    }
docs: /*
  find the parent path that is the
  archive path in the path. The last
  path segment that ends with .har is
  the path that will be returned.