@Override public Path call() throws Exception {
  final Set<FileVisitOption> options;
  if (followLinks) {
    options=EnumSet.of(FileVisitOption.FOLLOW_LINKS);
  }
 else {
    options=EnumSet.noneOf(FileVisitOption.class);
  }
  logger.info(String.format("Starting scan of: \"%s\".",path));
  try {
    Files.walkFileTree(path,options,maxDepth,this);
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,String.format("Error while scanning path: \"%s\".",path),e);
    throw e;
  }
  logger.info(String.format("Completed scan of: \"%s\".",path));
  return path;
}

@ Override public Path call ( ) throws Exception { final Set < FileVisitOption > options ; if ( followLinks ) { options = EnumSet . of ( FileVisitOption . FOLLOW_LINKS ) ; } else { options = EnumSet . noneOf ( FileVisitOption . class ) ; } logger . info ( String . format ( "Starting scan of: \"%s\"." , path ) ) ; try { Files . walkFileTree ( path , options , maxDepth , this ) ; } catch ( IOException e ) { logger . log ( Level . SEVERE , String . format ( "Error while scanning path: \"%s\"." , path ) , e ) ; throw e ; } logger . info ( String . format ( "Completed scan of: \"%s\"." , path ) ) ; return path ; }
recursively walks the file tree of a directory .
