Пример #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();
   }
 }
Пример #2
0
 protected void eraseTempDir() {
   File tmpdirF = new File(tmpdir);
   if (tmpdirF.exists()) {
     eraseFiles();
     tmpdirF.delete();
   }
 }
Пример #3
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();
     }
   }
 }
Пример #4
0
 protected void mkdir(String dir) {
   File f = new File(dir);
   f.mkdirs();
 }