@Override public void execute() throws Exception { HerdFileUtils.deleteDirectoryIgnoreException(testFile); } });
@Override public void execute() throws Exception { HerdFileUtils.deleteDirectoryIgnoreException(new File("I_DO_NOT_EXIST")); } });
/** * Deletes a local test directory with a test file. * * @throws IOException if fails to create a local test file */ @Test public void testDeleteDirectoryIgnoreException() throws IOException { File testFile = createLocalFile(localTempPath.toString(), "SOME_FILE", FILE_SIZE_1_KB); HerdFileUtils.deleteDirectoryIgnoreException(localTempPath.toFile()); assertFalse(testFile.exists()); assertFalse(localTempPath.toFile().exists()); }