docs: public static List<File> scanDirectoryForFiles(BuildContext buildContext, final File directory,
  			final String[] includes, final String[] excludes, boolean defaultExcludes) throws IOException {
  		if (!directory.exists()) {
  			return Collections.emptyList();
  		}
  		final Scanner scanner;
  
  		if (buildContext != null) {
  			scanner = buildContext.newScanner(directory, true);
  		} else {
  			final DirectoryScanner directoryScanner = new DirectoryScanner();
  			directoryScanner.setBasedir(directory.getAbsoluteFile());
  			scanner = directoryScanner;
  		}
  		scanner.setIncludes(includes);
  		scanner.setExcludes(excludes);
  		if (defaultExcludes) {
  			scanner.addDefaultExcludes();
  		}
  
  		scanner.scan();
  
  		final List<File> files = new ArrayList<File>();
  		for (final String name : scanner.getIncludedFiles()) {
  			files.add(new File(directory, name).getCanonicalFile());
  		}
  
  		return files;
  	}