Delete all files and directories of specific directory
Posted: Wed May 14, 2014 3:42 pm
If you want to delete all files and directories of a specific directory - with JVx - check following snippet:
- Code: Select all
String sTmp = System.getProperty("java.io.tmpdir");
File fi = new File(sTmp, "myapp");
fi.mkdirs();
//create temporary files
FileUtil.deleteSub(fi);
//or
//FileUtil.delete(fi);