fileWalker.setFileHandler(new FileWalkerHandler() {
@Override
public ResourceId handle(File file, int depth, ProgressEntry parent) {
progressMonitor.startJob(file.toURI());
ResourceId parentId = parent == null ? null : parent.getResourceId();
fileEventHandler.onEvent(file, parentId, null);
return null;
}
});
fileWalker.setDirectoryHandler(new FileWalkerHandler() {
@Override
public ResourceId handle(File file, int depth, ProgressEntry parent) {
progressMonitor.startJob(file.toURI());
ResourceId parentId = parent == null ? null : parent.getResourceId();
return directoryEventHandler.onEvent(file, parentId, depth, false);
}
});
fileWalker.setRestrictedDirectoryHandler(new FileWalkerHandler() {
@Override
public ResourceId handle(File file, int depth, ProgressEntry parent) {
progressMonitor.startJob(file.toURI());
ResourceId parentId = parent == null ? null : parent.getResourceId();
return directoryEventHandler.onEvent(file, parentId, depth, true);
}
});
walkState.setWalkStatus(WalkStatus.IN_PROGRESS);