public static @NotNull String getNameOrUrlPart(@NotNull VirtualFile file) {
    String name = file.getName();
    if (file.getParent() != null) return name;
    if (file.isInLocalFileSystem()) {
      return "/".equals(name) ? "" : name; // on Unix FS root name is "/"
    }
    return VirtualFileManager.constructUrl(file.getFileSystem().getProtocol(), StringUtil.trimStart(name, "/"));
  }
public static @NotNull String getNameOrUrlPart(@NotNull VirtualFile file)