if(dir==null || dir.exists()) {
if(dir==null || !dir.exists()) {
    public static void recursiveDelete(File dir) {        if(dir==null || dir.exists()) {            //no-op            return;        }        if(dir.isDirectory()) {            File[] files = dir.listFiles();            for(int i=0;i<files.length;i++) {                recursiveDelete(files[i]);            }        }        dir.delete();    }