net.ericaro.diezel.core.builder.FileUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of diezel-maven-plugin Show documentation
Show all versions of diezel-maven-plugin Show documentation
An Embedded Domain Specific Language Parser Generator PLugin compiler
The newest version!
package net.ericaro.diezel.core.builder;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
public class FileUtils {
public static void printFile(File file, String content, boolean close)
throws IOException {
file.getParentFile().mkdirs();
//System.out.println("DIEZEL is generating "+file);
OutputStreamWriter w = new OutputStreamWriter(
new FileOutputStream(file));
w.write(content);
if (close)
w.close();
}
}