Example #1
0
 public void deleteDir(File dir) {
   FileUtils.deleteTree(dir);
   if (dir.isDirectory()) {
     try {
       new File(dir, ".delete").createNewFile();
     } catch (IOException e) {
       logger.warn("Could not mark directory to be deleted", e);
     }
   }
 }
Example #2
0
 // @Override
 protected void doTearDown() throws Exception {
   // TestConnector dispatches events via the test: protocol to test://test
   // endpoints, which seems to end up in a directory called "test" :(
   FileUtils.deleteTree(FileUtils.newFile(getTestConnector().getProtocol()));
   super.doTearDown();
 }