public static @NotNull @NlsSafe String getFileName(@NotNull Path path) {
    Path name = path.getFileName();
    return (name != null ? name : path).toString();
  }
public static @NotNull @NlsSafe String getFileName(@NotNull Path path)