Example #1
0
 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();
   }
 }
Example #2
0
 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();
     }
   }
 }