code: public boolean seemsLikeADirectory() {
      int length = path.length();
      return path.isEmpty()
          || path.charAt(length - 1) == SEPARATOR
          || path.endsWith(".") && (length == 1 || path.charAt(length - 2) == SEPARATOR)
          || path.endsWith("..") && (length == 2 || path.charAt(length - 3) == SEPARATOR);
    }
docs: Returns {@code true} if path ends with a trailing slash, or would after normalization.