}
System.out.println(ANSI.green("copying: "+f.getPath()));
File dest_ = new File(outdir.getAbsolutePath()+File.separatorChar+suffix+"-");
+ new File(dest_.getParent()).mkdirs();
FileOutputStream fos = new FileOutputStream(dest_);
FileInputStream fis = new FileInputStream(f);
byte[] buf = new byte[1024];
Class.forName("Main").
getMethod("main", new Class[] { String[].class }).
invoke(null, new Object[] { new String[] { f.getAbsolutePath() } });
+ try {
new File(new File(outPath).getParent()).mkdirs();
PrintWriter pw = new PrintWriter(new OutputStreamWriter(new FileOutputStream(outPath+"+")));
pw.println(ret);
pw.close();
File dest = new File(outPath);
if (dest.exists()) {
- try {
Process p = Runtime.getRuntime().exec(new String[] {
"diff",
"-Bub",
/*else System.out.println(ANSI.blue(s));*/
}
p.waitFor();
- } catch (Exception e) {
- e.printStackTrace();
- }
}
new File(outPath+"+").renameTo(dest);
if (dest.lastModified() <= f.lastModified())
dest.setLastModified(f.lastModified()+1);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
}