comparison src/name/blackcap/exifwasher/Files.kt @ 22:cd2ca4727b7f

Builds under Windows.
author davidb
date Thu, 16 Apr 2020 11:10:39 -0700
parents dc1f4359659d
children
comparison
equal deleted inserted replaced
21:539c3641c539 22:cd2ca4727b7f
40 /* file names */ 40 /* file names */
41 41
42 private val SHORTNAME = "exifwasher" 42 private val SHORTNAME = "exifwasher"
43 private val LONGNAME = "name.blackcap." + SHORTNAME 43 private val LONGNAME = "name.blackcap." + SHORTNAME
44 private val HOME = System.getenv("HOME") 44 private val HOME = System.getenv("HOME")
45 private val APPDATA = System.getenv("APPDATA")
46 val PF_DIR = when (OS.type) { 45 val PF_DIR = when (OS.type) {
47 OS.MAC -> joinPath(HOME, "Library", "Application Support", LONGNAME) 46 OS.MAC -> joinPath(HOME, "Library", "Application Support", LONGNAME)
48 OS.WINDOWS -> joinPath(APPDATA, "Roaming", LONGNAME) 47 OS.WINDOWS -> joinPath(System.getenv("APPDATA"), LONGNAME)
49 else -> joinPath(HOME, "." + SHORTNAME) 48 else -> joinPath(HOME, "." + SHORTNAME)
50 } 49 }
51 val LF_DIR = when (OS.type) { 50 val LF_DIR = when (OS.type) {
52 OS.MAC -> joinPath(HOME, "Library", "Application Support", LONGNAME) 51 OS.MAC -> joinPath(HOME, "Library", "Application Support", LONGNAME)
53 OS.WINDOWS -> joinPath(APPDATA, "Local", LONGNAME) 52 OS.WINDOWS -> joinPath(System.getenv("LOCALAPPDATA"), LONGNAME)
54 else -> joinPath(HOME, "." + SHORTNAME) 53 else -> joinPath(HOME, "." + SHORTNAME)
55 } 54 }
56 val PROP_FILE = File(PF_DIR, SHORTNAME + ".properties") 55 val PROP_FILE = File(PF_DIR, SHORTNAME + ".properties")
57 val LOG_FILE = File(LF_DIR, SHORTNAME + ".log") 56 val LOG_FILE = File(LF_DIR, SHORTNAME + ".log")
58 57