List of usage examples for org.apache.commons.io FileUtils deleteDirectory
public static void deleteDirectory(File directory) throws IOException
From source file:de.uzk.hki.da.pkg.NativeJavaArchiveBuilderTests.java
@After public void tearDown() throws IOException { new File(tarPath).delete(); FileUtils.deleteDirectory(new File(targetDirPath)); }
From source file:net.sf.infrared.tool.archive.TestWebArchive.java
@Before public void setDirs() throws IOException { workDir = ConfigHolder.getConfig().getWorkDir(); outputDir = ConfigHolder.getConfig().getOutputDir(); FileUtils.deleteDirectory(workDir); FileUtils.deleteDirectory(outputDir); }
From source file:de.nrw.hbz.regal.sync.ingest.TestOpusDownloader.java
@Before public void setUp() throws IOException { FileUtils.deleteDirectory(new File(piddownloaderDownloadLocation)); }
From source file:com.gs.obevo.db.impl.platforms.oracle.OracleRevengIT.java
@Test public void testReveng() throws Exception { AquaRevengArgs args = new AquaRevengArgs(); args.setDbSchema("DBDEPLOY01"); //args.setInputPath(new File("./src/test/resources/reveng/db2look/input/db2input.txt")); args.setGenerateBaseline(false);/*from www . ja v a 2 s .c o m*/ args.setJdbcUrl( "jdbc:oracle:thin:@dbdeploy-oracle-12-1.c87tzbeo5ssa.us-west-2.rds.amazonaws.com:1521:DBDEPLOY"); args.setUsername("deploybuilddbo"); args.setPassword("deploybuilddb0"); File outputDir = new File("./target/outputReveng"); FileUtils.deleteDirectory(outputDir); args.setOutputPath(outputDir); new OracleReveng().reveng(args); }
From source file:jatoo.exec.CommandExecutorTest.java
@Test public void test() throws Exception { FileUtils.deleteDirectory(DIRECTORY_TESTS); Assert.assertFalse(DIRECTORY_TESTS.exists()); DIRECTORY_TESTS.mkdirs();/*from w w w .j av a2 s .co m*/ Assert.assertTrue(DIRECTORY_TESTS.exists()); FileUtils.copyFileToDirectory(new File("src/test/resources/pom.xml"), DIRECTORY_TESTS); DIRECTORY_TESTS_TARGET.mkdirs(); Assert.assertTrue(DIRECTORY_TESTS_TARGET.exists()); executor.exec("mvn clean", DIRECTORY_TESTS, DUMP_TO_SYSTEM_OUT ? System.out : null); Assert.assertFalse(DIRECTORY_TESTS_TARGET.exists()); }
From source file:com.indeed.lsmtree.recordlog.TestRecordLogDirectoryQuickly.java
@Override public void tearDown() throws Exception { FileUtils.cleanDirectory(dir); FileUtils.deleteDirectory(dir); }
From source file:com.rapleaf.hank.ZkTestCase.java
public static void setupZkServer() throws Exception { if (server == null) { LOG.debug("deleting zk data dir (" + zkDir + ")"); File zkDirFile = new File(zkDir); FileUtils.deleteDirectory(zkDirFile); zkDirFile.mkdirs();/*ww w .j a va2 s.c o m*/ server = new ZooKeeperServer(zkDirFile, zkDirFile, TICK_TIME); int clientPort = 2000; while (true) { LOG.debug("Trying to bind server to port " + clientPort); try { standaloneServerFactory = new NIOServerCnxn.Factory(new InetSocketAddress(clientPort)); } catch (BindException e) { LOG.trace("Failed binding ZK Server to client port: " + clientPort); //this port is already in use. try to use another clientPort++; continue; } LOG.debug("Succeeded in binding ZK Server to client port " + clientPort); break; } standaloneServerFactory.startup(server); if (!waitForServerUp(clientPort, CONNECTION_TIMEOUT)) { throw new IOException("Waiting for startup of standalone server"); } zkClientPort = clientPort; } }
From source file:com.netflix.dynomitemanager.sidecore.utils.test.SystemUtilsTest.java
@Test public void createDirTest() throws IOException { String tmpdir = System.getProperty("java.io.tmpdir"); SystemUtils.createDirs(tmpdir + "/dm/test"); Assert.assertTrue(new File(tmpdir + "/dm/test").exists()); FileUtils.deleteDirectory(new File(tmpdir + "/dm/test")); }
From source file:com.splunk.shuttl.archiver.bucketlock.BucketLockTest.java
@AfterMethod public void tearDown() throws IOException { FileUtils.deleteDirectory(testRootDirectory); FileUtils.deleteDirectory(locksDirectory); }
From source file:ddf.security.command.EncryptCommandTest.java
@After public void cleanUp() throws Exception { FileUtils.deleteDirectory(ddfHome); }