in src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java [360:376]
void findPathsUnderNode(final InstallerConfig cfg, final Session session,
final Node n) throws RepositoryException {
final String path = n.getPath();
final int priority = cfg.getFolderNameFilter().getPriority(path);
if (priority > 0) {
cfg.addWatchedFolder(new WatchedFolder(session, path, priority, cfg.getConverters()));
}
final int depth = path.split("/").length;
if (depth > cfg.getMaxWatchedFolderDepth()) {
logger.debug("Not recursing into {} due to maxWatchedFolderDepth={}", path, cfg.getMaxWatchedFolderDepth());
return;
}
final NodeIterator it = n.getNodes();
while (it.hasNext()) {
findPathsUnderNode(cfg, session, it.nextNode());
}
}