// Scan All Content. (intentional)
allIncludes.add( "**/*" );
// Setup Directory Walker
DirectoryWalker dirWalker = new DirectoryWalker();
dirWalker.setBaseDir( repositoryBase );
dirWalker.setIncludes( allIncludes );
dirWalker.setExcludes( allExcludes );
// Setup the Scan Instance
RepositoryScannerInstance scannerInstance =
new RepositoryScannerInstance( repository, knownContentConsumers, invalidContentConsumers, changesSince );
inProgressScans.add( scannerInstance );
RepositoryScanStatistics stats;
try
{
dirWalker.addDirectoryWalkListener( scannerInstance );
// Execute scan.
dirWalker.scan();
stats = scannerInstance.getStatistics();
stats.setKnownConsumers( gatherIds( knownContentConsumers ) );
stats.setInvalidConsumers( gatherIds( invalidContentConsumers ) );