code: private void collectFilesAndStore(final Context context, final Path dir, final int level) throws FrameworkException {
  
  		if (level == 1) {
  			logger.info("Path {}", dir);
  		}
  
  		try (final DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) {
  
  			for (final Path p : stream) {
  
  				if (Files.isDirectory(p)) {
  
  					collectFilesAndStore(context, p, level+1);
  
  				} else {
  
  					context.update(storeLogEntry(p));
  
  					// update object count and commit
  					context.commit(true);
  				}
  
  				Files.delete(p);
  
  			}
  
  		} catch (IOException ioex) {
  			logger.warn("", ioex);
  		}
  	}
docs: ----- private methods -----