public static boolean fullyDelete(final File dir) {
    return fullyDelete(dir, false);
  }
@Test (timeout = 30000)
  public void testFullyDeleteSymlinks() throws IOException {
    File link = new File(del, LINK);
    assertDelListLength(5);
    // Since tmpDir is symlink to tmp, fullyDelete(tmpDir) should not
    // delete contents of tmp. See setupDirs for details.
    boolean ret = FileUtil.fullyDelete(link);
    Assert.assertTrue(ret);
    Verify.notExists(link);
    assertDelListLength(4);
    validateTmpDir();

    File linkDir = new File(del, "tmpDir");
    // Since tmpDir is symlink to tmp, fullyDelete(tmpDir) should not
    // delete contents of tmp. See setupDirs for details.
    ret = FileUtil.fullyDelete(linkDir);
    Assert.assertTrue(ret);
    Verify.notExists(linkDir);
    assertDelListLength(3);
    validateTmpDir();
  }