Do the work.
log("DEPRECATED - The deltree task is deprecated. "
+ "Use delete instead.");
if (dir == null) {
throw new BuildException("dir attribute must be set!", getLocation());
}
if (dir.exists()) {
if (!dir.isDirectory()) {
if (!dir.delete()) {
throw new BuildException("Unable to delete directory "
+ dir.getAbsolutePath(),
getLocation());
}
return;
}
log("Deleting: " + dir.getAbsolutePath());
try {
removeDir(dir);
} catch (IOException ioe) {
String msg = "Unable to delete " + dir.getAbsolutePath();
throw new BuildException(msg, getLocation());
}
}