comparison src/name/blackcap/clipman/Files.kt @ 44:d14298ef8b0a

Fix some settings/preferences issues.
author David Barts <n5jrn@me.com>
date Sun, 09 Feb 2020 22:13:26 -0700
parents 33fbe3a78d84
children 19d9da731c43
comparison
equal deleted inserted replaced
43:339e2da5bf83 44:d14298ef8b0a
62 private fun File.makeIfNeeded() = if (exists()) { true } else { mkdirs() } 62 private fun File.makeIfNeeded() = if (exists()) { true } else { mkdirs() }
63 63
64 /* make some usable objects */ 64 /* make some usable objects */
65 65
66 val DPROPERTIES = Properties().apply { 66 val DPROPERTIES = Properties().apply {
67 OS::class.java.getClassLoader().getResourceAsStream("default.properties").use { load(it) } 67 OS::class.java.getResourceAsStream("default.properties").use { load(it) }
68 } 68 }
69 69
70 val PROPERTIES = Properties(DPROPERTIES).apply { 70 val PROPERTIES = Properties(DPROPERTIES).apply {
71 PF_DIR.makeIfNeeded() 71 PF_DIR.makeIfNeeded()
72 PROP_FILE.createNewFile() 72 PROP_FILE.createNewFile()