Config Handler
Create a config handler. Writes automatically the default config if not existing.
Parameters
default Config
The default config.
path
The path to the file with the file name and extension. In normal cases should be an ".json" file.
Throws
If file is not read- or writeable an IOException is thrown.
open fun ConfigHandler(defaultConfig: Config, path: String, writeDefaultConfigAutomatically: Boolean)
Content copied to clipboard
Create a config handler.
Parameters
default Config
The default config.
path
The path to the file with the file name and extension. In normal cases should be an ".json" file.
write Default Config Automatically
If true the default config will be written automatically if no config exists. If this is enabled the config will also be updated every time the handler is created.
Throws
If file is not read- or writeable an IOException is thrown.