[skip ci] change default desktop config to desktop-config.yaml
This commit is contained in:
parent
d572705a15
commit
3f3974794a
1 changed files with 3 additions and 4 deletions
|
@ -11,13 +11,13 @@ import java.io.FileWriter
|
||||||
* Returns WorkplaceConfig; data for config is read from specified file.
|
* Returns WorkplaceConfig; data for config is read from specified file.
|
||||||
* Throws exceptions FileNotFoundException, SerializationException if file is not found resp. cannot be parsed.
|
* Throws exceptions FileNotFoundException, SerializationException if file is not found resp. cannot be parsed.
|
||||||
*/
|
*/
|
||||||
internal fun getConfig(filename: String = "WorkplaceConfig.yaml"): DesktopConfig {
|
internal fun getConfig(filename: String = "desktop-config.yaml"): DesktopConfig {
|
||||||
return readFromFile(filename).yamlToType<DesktopConfig>()
|
return readFromFile(filename).yamlToType()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
internal fun writeConfig(config: DesktopConfig, fileName: String = "WorkplaceConfigExample.yaml") {
|
internal fun writeConfig(config: DesktopConfig, fileName: String = "desktop-config.yaml") {
|
||||||
FileWriter(fileName).use {
|
FileWriter(fileName).use {
|
||||||
it.write(
|
it.write(
|
||||||
Yaml.default.encodeToString(
|
Yaml.default.encodeToString(
|
||||||
|
@ -26,5 +26,4 @@ internal fun writeConfig(config: DesktopConfig, fileName: String = "WorkplaceCon
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue