private static boolean isWritable(Path dir) {
    if (SystemInfo.isWindows) {
      try {
        Files.deleteIfExists(Files.createTempFile(dir, "probe_", ".txt"));
        return true;
      }
      catch (IOException e) {
        Logger.getInstance(ProjectWizardUtil.class).debug(e);
        return false;
      }
    }
    else {
      return Files.isWritable(dir);
    }
  }
private static boolean isWritable(Path dir)