private static void copyInspectionReportResource(@NotNull String resourceName, @NotNull Path targetDirectory) {
    Path resourceTargetFile = targetDirectory.resolve(resourceName);
    try {
      Files.createDirectories(resourceTargetFile.getParent());
    }
    catch (IOException e) {
      LOG.error("Can't create file: " + resourceTargetFile);
    }

    try (InputStream input = InspectionTreeHtmlExportResources.class.getClassLoader().getResourceAsStream("inspectionReport/" + resourceName)) {
      Files.copy(Objects.requireNonNull(input), resourceTargetFile, StandardCopyOption.REPLACE_EXISTING);
    }
    catch (IOException e) {
      LOG.error(e);
    }
  }
private static void copyInspectionReportResource(@NotNull String resourceName, @NotNull Path targetDirectory)