code: public static Schema getDirectorySchema(Path directory, Configuration conf, boolean latest) throws IOException {
      return getDirectorySchema(directory, FileSystem.get(conf), latest);
    }
docs: Get the latest avro schema for a directory
  @param directory the input dir that contains avro files
  @param conf configuration
  @param latest true to return latest schema, false to return oldest schema
  @return the latest/oldest schema in the directory
  @throws IOException