code: static List<String> pathParts(String path) {
          String[] pathParts = path.split("/");
          List<String> parts = new ArrayList<>(pathParts.length);
          String pathSoFar = "";
          for (String pathPart : pathParts) {
              if (!pathPart.equals("")) {
                  pathSoFar += "/" + pathPart;
                  parts.add(pathSoFar);
              }
          }
          return parts;
      }
docs: Parse a znode path, and return a list containing the full paths to its constituent directories.
  
  @param path Path to parse.
  @return List of paths.