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 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(); } } }