in src/main/java/org/apache/maven/plugins/clean/Cleaner.java [263:280]
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
if (ON_WINDOWS && !followSymlinks && attrs.isOther()) {
/*
* MCLEAN-93: NTFS junctions have isDirectory() and isOther() attributes set.
* If not following symbolic links, then it should be handled as a file.
*/
visitFile(dir, attrs);
return FileVisitResult.SKIP_SUBTREE;
}
if (selector == null || selector.couldHoldSelected(dir)) {
nonEmptyDirectoryLevels.clear(++currentDepth);
return FileVisitResult.CONTINUE;
} else {
nonEmptyDirectoryLevels.set(currentDepth); // Remember that this directory is not empty.
logger.debug("Not recursing into directory without included files " + dir);
return FileVisitResult.SKIP_SUBTREE;
}
}