class DirectoryReader {

	public static Set<File> listAllRecursively(File directory) {
		Ensure.not_null(directory, "directory == null");
		Ensure.is_true(directory.isDirectory(), "file is not a directory");
		
		Set<File> result = new HashSet<>();
		
		File[] files = directory.listFiles();
		for (File f : files) {
			if (f.isDirectory()) {
				result.addAll(listAllRecursively(f));
			} else {
				result.add(f);
			}
		}
		
		return result;
	}

	private  DirectoryReader();

}