コード例 #1
0
 private void cleanStorage() {
   File storage = getStorageArea();
   log.debugf("Deleting storage: %s", storage.getAbsolutePath());
   try {
     deleteRecursively(storage);
   } catch (IOException ex) {
     log.errorf(ex, "Cannot delete storage area");
   }
 }
コード例 #2
0
 private void deleteRecursively(File file) throws IOException {
   if (file.isDirectory()) {
     for (File aux : file.listFiles()) deleteRecursively(aux);
   }
   file.delete();
 }