SourceControlAdapter sca = AuraUtil.getSourceControlAdapter();
try {
File f = new File(url.getFile());
boolean existed = f.exists();
if (existed && !f.canWrite() && sca.canCheckout()) {
sca.checkout(f);
}
if (!f.getParentFile().exists()) {
f.getParentFile().mkdirs();
}
OutputStreamWriter fw = new OutputStreamWriter(new FileOutputStream(f), "UTF-8");