@NotNull
  private static String surroundWithSlashes(@NotNull String path) {
    if (path.isEmpty()) {
      return PATH_DELIMITER;
    }
    boolean prepend = !path.startsWith(PATH_DELIMITER);
    boolean append = !path.endsWith(PATH_DELIMITER);
    if (prepend && append) {
      return PATH_DELIMITER + path + PATH_DELIMITER;
    }
    if (prepend) {
      path = PATH_DELIMITER + path;
    }
    if (append) {
      path += PATH_DELIMITER;
    }
    return path;
  }
@NotNull
  private static String surroundWithSlashes(@NotNull String path)