protected void eraseFiles() { File tmpdirF = new File(tmpdir); String[] files = tmpdirF.list(); for (int i = 0; files != null && i < files.length; i++) { new File(tmpdir + "/" + files[i]).delete(); } }
protected void eraseTempDir() { File tmpdirF = new File(tmpdir); if (tmpdirF.exists()) { eraseFiles(); tmpdirF.delete(); } }
protected void eraseFiles(final String filesEndingWith) { File tmpdirF = new File(tmpdir); String[] files = tmpdirF.list(); for (int i = 0; files != null && i < files.length; i++) { if (files[i].endsWith(filesEndingWith)) { new File(tmpdir + "/" + files[i]).delete(); } } }
protected void mkdir(String dir) { File f = new File(dir); f.mkdirs(); }