Per-OS Electron userData dir for a given Desktop appId.
(d: DetectDeps, appId: string)
| 113 | |
| 114 | /** Per-OS Electron userData dir for a given Desktop appId. */ |
| 115 | function desktopUserDataDir(d: DetectDeps, appId: string): string { |
| 116 | switch (d.platform) { |
| 117 | case "darwin": |
| 118 | return join(d.home, "Library", "Application Support", appId); |
| 119 | case "win32": |
| 120 | return join(d.env.APPDATA ?? join(d.home, "AppData", "Roaming"), appId); |
| 121 | default: |
| 122 | return join(xdgConfigHome(d), appId); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | /** Per-OS GUI app install paths (secondary "installed but maybe never run"). */ |
| 127 | function desktopAppPaths(d: DetectDeps): string[] { |
no test coverage detected