public static Map<String,File> filesInDirectory(File dir,String regex,boolean recursively){
  return filesInDirectory(dir,Pattern.compile(regex),recursively);
}

public static Map < String , File > filesInDirectory ( File dir , String regex , boolean recursively ) { return filesInDirectory ( dir , Pattern . compile ( regex ) , recursively ) ; }
get files in the directory . the result would be a filename = & gt ; file map .
