Mercurial > cgi-bin > hgweb.cgi > PassMan
comparison src/main/kotlin/name/blackcap/passman/Files.kt @ 6:711cc42e96d7
Got the list subcommand working, but needs efficiency improvements.
author | David Barts <n5jrn@me.com> |
---|---|
date | Tue, 20 Sep 2022 20:52:21 -0700 |
parents | a6cfdffcaa94 |
children | 0fc90892a3ae |
comparison
equal
deleted
inserted
replaced
5:ad997df1f560 | 6:711cc42e96d7 |
---|---|
32 | 32 |
33 fun joinPath(base: String, vararg rest: String) = rest.fold(File(base), ::File) | 33 fun joinPath(base: String, vararg rest: String) = rest.fold(File(base), ::File) |
34 | 34 |
35 /* file names */ | 35 /* file names */ |
36 | 36 |
37 private const val SHORTNAME = "passman" | 37 const val SHORTNAME = "passman" |
38 const val MAIN_PACKAGE = "name.blackcap." + SHORTNAME | 38 const val MAIN_PACKAGE = "name.blackcap." + SHORTNAME |
39 private val HOME = System.getenv("HOME") | 39 private val HOME = System.getenv("HOME") |
40 private val PF_DIR = when (OS.type) { | 40 private val PF_DIR = when (OS.type) { |
41 OS.MAC -> joinPath(HOME, "Library", "Application Support", MAIN_PACKAGE) | 41 OS.MAC -> joinPath(HOME, "Library", "Application Support", MAIN_PACKAGE) |
42 OS.WINDOWS -> joinPath(System.getenv("APPDATA"), MAIN_PACKAGE) | 42 OS.WINDOWS -> joinPath(System.getenv("APPDATA"), MAIN_PACKAGE) |