code: public static PathAndNode getPathAndNode(String path)
      {
          PathUtils.validatePath(path);
          int i = path.lastIndexOf(PATH_SEPARATOR);
          if ( i < 0 )
          {
              return new PathAndNode(path, "");
          }
          if ( (i + 1) >= path.length() )
          {
              return new PathAndNode(PATH_SEPARATOR, "");
          }
          String node = path.substring(i + 1);
          String parentPath = (i > 0) ? path.substring(0, i) : PATH_SEPARATOR;
          return new PathAndNode(parentPath, node);
      }
docs: Given a full path, return the node name and its path. i.e. "/one/two/three" will return {"/one/two", "three"}
  
  @param path the path
  @return the node