public void generate(String packageName, String templatePath, File file, boolean force)
throws IOException {
if (file.exists() && !force) {
log.debug("file " + file + " exists, skipped");
return;
}
String code = generateCode(packageName, templatePath);
file.getParentFile().mkdirs();
Files.write(file, code.getBytes(Charset.forName("utf8")));
}
public void generate(String packageName, String templatePath, File file, boolean force)
throws IOException {
if (file.exists() && !force) {
log.debug("file " + file + " exists, skipped");
return;
}
String code = generateCode(packageName, templatePath);
file.getParentFile().mkdirs();
Files.write(file, code.getBytes(Charset.forName("utf8")));
}