code: public static List<File> listDirectFiles( File directory, String fileExtension ) {
  
  		String ext = fileExtension;
  		if( ext != null ) {
  			ext = ext.toLowerCase();
  			if( ! ext.startsWith( "." ))
  				ext = "." + ext;
  		}
  
  		List<File> result = new ArrayList<> ();
  		File[] files = directory.listFiles();
  		if( files != null ) {
  			for( File f : files ) {
  				if( f.isFile() &&
  						(ext == null || f.getName().toLowerCase().endsWith( ext ))) {
  					result.add( f );
  				}
  			}
  		}
  
  		return result;
  	}
docs: Finds all the files directly contained in a directory and with a given extension.
  <p>
  Search is case-insensitive.
  It means searching for properties or PROPERTIES extensions will give
  the same result.
  </p>
  
  @param directory an existing directory
  @param fileExtension a file extension (null will not filter extensions)
  <p>
  If it does not start with a dot, then one will be inserted at the first position.
  </p>
  
  @return a non-null list of files