comparison src/name/blackcap/imageprep/Files.kt @ 4:5234e4500d45

Command-line arguments (only partially tested).
author David Barts <n5jrn@me.com>
date Fri, 17 Jul 2020 14:51:41 -0700
parents 0bded24f746e
children 098c4f5507c7
comparison
equal deleted inserted replaced
3:09dcd475d1bf 4:5234e4500d45
38 38
39 fun joinPath(base: String, vararg rest: String) = rest.fold(File(base), ::File) 39 fun joinPath(base: String, vararg rest: String) = rest.fold(File(base), ::File)
40 40
41 /* file names */ 41 /* file names */
42 42
43 private val SHORTNAME = "imageprep" 43 private val SHORTNAME = Application.MYNAME.toLowerCase()
44 private val LONGNAME = "name.blackcap." + SHORTNAME 44 private val LONGNAME = "name.blackcap." + SHORTNAME
45 private val HOME = System.getenv("HOME") 45 private val HOME = System.getenv("HOME")
46 val PF_DIR = when (OS.type) { 46 val PF_DIR = when (OS.type) {
47 OS.MAC -> joinPath(HOME, "Library", "Application Support", LONGNAME) 47 OS.MAC -> joinPath(HOME, "Library", "Application Support", LONGNAME)
48 OS.WINDOWS -> joinPath(System.getenv("APPDATA"), LONGNAME) 48 OS.WINDOWS -> joinPath(System.getenv("APPDATA"), LONGNAME)