watch File
Returns a child config containing values from specified file, and reloads values when file content has been changed.
Format of the file is auto-detected from the file extension. Supported file formats and the corresponding extensions:
HOCON: conf
JSON: json
Properties: properties
TOML: toml
XML: xml
YAML: yml, yaml
Throws UnsupportedExtensionException if the file extension is unsupported.
Return
a child config containing values from watched file
Parameters
specified file
delay to observe between every check. The default value is 5.
time unit of delay. The default value is TimeUnit.SECONDS.
context of the coroutine. The default value is Dispatchers.Default.
whether the source is optional
function invoked after the updated file is loaded
Throws
Returns a child config containing values from specified file path, and reloads values when file content has been changed.
Format of the file is auto-detected from the file extension. Supported file formats and the corresponding extensions:
HOCON: conf
JSON: json
Properties: properties
TOML: toml
XML: xml
YAML: yml, yaml
Throws UnsupportedExtensionException if the file extension is unsupported.
Return
a child config containing values from watched file
Parameters
specified file path
delay to observe between every check. The default value is 5.
time unit of delay. The default value is TimeUnit.SECONDS.
context of the coroutine. The default value is Dispatchers.Default.
whether the source is optional
function invoked after the updated file is loaded