code: private ResourcePathNode<D> navigateFrom(ResourcePathNode<D> resourcePath) {
  
      if (isParentDirectory()) {
        ResourcePathNode<D> result = resourcePath;
        ResourcePathNode<D> segment = this;
        do {
          assert (segment.isParentDirectory());
          if (result.isParentDirectory()) {
            return new ResourcePathNode<>(result, segment.name, segment.data);
          } else {
            result = result.navigateUp();
          }
          segment = segment.parent;
        } while (segment.parent != null);
        return result;
      } else if (this.parent == null) {
        return resourcePath;
      } else {
        return new ResourcePathNode<>(this.parent.navigateFrom(resourcePath), this.name, this.data);
      }
    }
docs: Recursive and inverted implementation of {@link #navigateTo(ResourcePathNode)}.
  
  @param resourcePath is the {@link ResourcePathNode} to navigate from.
  @return the resulting {@link ResourcePathNode}.