MCPcopy Create free account
hub / github.com/cortexkit/magic-context / desktopUserDataDir

Function desktopUserDataDir

packages/cli/src/lib/opencode-detect.ts:115–124  ·  view source on GitHub ↗

Per-OS Electron userData dir for a given Desktop appId.

(d: DetectDeps, appId: string)

Source from the content-addressed store, hash-verified

113
114/** Per-OS Electron userData dir for a given Desktop appId. */
115function 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"). */
127function desktopAppPaths(d: DetectDeps): string[] {

Callers 2

detectOpenCodeFunction · 0.85

Calls 1

xdgConfigHomeFunction · 0.85

Tested by

no test coverage detected