[skip ci] change default desktop config to desktop-config.yaml

This commit is contained in:
ansgarz 2022-03-17 20:13:27 +01:00
parent d572705a15
commit 3f3974794a

View file

@ -11,13 +11,13 @@ import java.io.FileWriter
* Returns WorkplaceConfig; data for config is read from specified file.
* Throws exceptions FileNotFoundException, SerializationException if file is not found resp. cannot be parsed.
*/
internal fun getConfig(filename: String = "WorkplaceConfig.yaml"): DesktopConfig {
return readFromFile(filename).yamlToType<DesktopConfig>()
internal fun getConfig(filename: String = "desktop-config.yaml"): DesktopConfig {
return readFromFile(filename).yamlToType()
}
@Suppress("unused")
internal fun writeConfig(config: DesktopConfig, fileName: String = "WorkplaceConfigExample.yaml") {
internal fun writeConfig(config: DesktopConfig, fileName: String = "desktop-config.yaml") {
FileWriter(fileName).use {
it.write(
Yaml.default.encodeToString(
@ -26,5 +26,4 @@ internal fun writeConfig(config: DesktopConfig, fileName: String = "WorkplaceCon
)
)
}
}