pull

open override fun pull(locale: String, file: Path): ConfigLoaderBuilder<T>

Resolves a locale-specific resource file and sets the output path.

Given a resource root directory (set via fromResource), this method tries:

  1. {root}{locale}.yml

  2. {root}en_US.yml (fallback)

If neither is found, an IllegalStateException is thrown. The resolved resource path and the given file are stored for use during load.

Example:

Yacla.loader<MyConfig>()
.fromResource("/assets/mymod/config/")
.pull("ja_JP", configFile)
.parser(YamlParser())
.load()

Parameters

locale

the locale string (e.g. "ja_JP", "en_US")

file

the output path where the resolved resource will be copied