@NotNull
  public static List<ExternalSystemEvent> parseEvents(@NotNull File directory) throws IOException {
    VersionedFile versionedFile = VersionedFile.find(directory.getAbsolutePath());
    List<String> lines = versionedFile.file.exists() ? Files.readAllLines(versionedFile.file.toPath()) : Collections.emptyList();
    if (!lines.isEmpty()) {
      List<ExternalSystemEvent> events = new ArrayList<>();
      for (String line : lines) {
        ExternalSystemEvent event = ExternalSystemEventSerializer.deserialize(line, versionedFile.version);
        if (event != null) {
          events.add(event);
        }
      }
      return events;
    }
    return Collections.emptyList();
  }
@NotNull
  public static List<ExternalSystemEvent> parseEvents(@NotNull File directory)