reload

inline fun <T : Any> reload(file: File): T

Reloads a configuration of type T from the specified file.

This is functionally equivalent to calling load again. It re-reads the file from disk, applies migrations, validates, and resolves @Env overrides.

Example:

val freshConfig = YamlConfigManager.reload<ServerConfig>(dataFolder.resolve("config.yml"))

Return

The freshly deserialized configuration instance.

Since

1.0

Parameters

T

The configuration data class type.

file

The YAML file to reload from.

See also

Throws

If the config cannot be loaded and no default can be created.