updateIfNeeded

open override fun updateIfNeeded(context: UpdateContext): Boolean

Checks whether the current config file is outdated compared to the default version. If outdated, merges missing or new keys from the default config into the current file, preserving user changes, then writes the updated config back to disk.

Return

true if the config file was updated; false if it was already up-to-date

Parameters

context

provides the target file, resource path, parser, and optional logger

Throws

if the default or current config root is not an ObjectNode