public static void copy(@NotNull File fromFile, @NotNull File toFile) throws IOException {
    if (!ensureCanCreateFile(toFile)) {
      return;
    }

    try (FileOutputStream fos = new FileOutputStream(toFile)) {
      try (FileInputStream fis = new FileInputStream(fromFile)) {
        copy(fis, fos);
      }
    }

    long timeStamp = fromFile.lastModified();
    if (timeStamp < 0) {
      logger().warn("Invalid timestamp " + timeStamp + " of '" + fromFile + "'");
    }
    else if (!toFile.setLastModified(timeStamp)) {
      logger().warn("Unable to set timestamp " + timeStamp + " to '" + toFile + "'");
    }
  }
public static void copy(@NotNull File fromFile, @NotNull File toFile)