in src/main/java/org/apache/maven/plugins/clean/Cleaner.java [103:130]
public void delete(
File basedir, Selector selector, boolean followSymlinks, boolean failOnError, boolean retryOnError)
throws IOException {
if (!basedir.isDirectory()) {
if (!basedir.exists()) {
if (logDebug != null) {
logDebug.log("Skipping non-existing directory " + basedir);
}
return;
}
throw new IOException("Invalid base directory " + basedir);
}
if (logInfo != null) {
logInfo.log("Deleting " + basedir + (selector != null ? " (" + selector + ")" : ""));
}
File file = followSymlinks ? basedir : basedir.getCanonicalFile();
if (selector == null && !followSymlinks && fastDir != null && session != null) {
// If anything wrong happens, we'll just use the usual deletion mechanism
if (fastDelete(file)) {
return;
}
}
delete(file, "", selector, followSymlinks, failOnError, retryOnError);
}