code: private static Configuration readConfigFile(String name, String dir, Configuration.Schema... schemas) throws IOException {
  		DirectoryRoot root = new DirectoryRoot(dir, BOOT_REGISTRY);
  		Path.Entry<ConfigFile> config = root.get(Trie.fromString(name), ConfigFile.ContentType);
  		if (config == null) {
  			return Configuration.EMPTY;
  		}
  		try {
  			// Read the configuration file
  			ConfigFile cf = config.read();
  			// Construct configuration according to given schema
  			return cf.toConfiguration(Configuration.toCombinedSchema(schemas));
  		} catch (SyntacticException e) {
  			e.outputSourceError(System.out, false);
  			System.exit(-1);
  			return null;
  		}
  	}
docs: Attempt to read a configuration file from a given root.
  
  @param name
  @param root
  @return
  @throws IOException