MCPcopy Create free account
hub / github.com/anomalyco/opencode / tauriDir

Function tauriDir

packages/desktop/src/main/migrate.ts:13–22  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

11// Resolve the directory where Tauri stored its .dat files for the given app identifier.
12// Mirrors Tauri's AppLocalData / AppData resolution per OS.
13function tauriDir(id: string) {
14 switch (process.platform) {
15 case "darwin":
16 return join(homedir(), "Library", "Application Support", id)
17 case "win32":
18 return join(process.env.APPDATA ?? join(homedir(), "AppData", "Roaming"), id)
19 default:
20 return join(process.env.XDG_DATA_HOME ?? join(homedir(), ".local", "share"), id)
21 }
22}
23
24// The Tauri app identifier changes between dev/beta/prod builds.
25const TAURI_APP_IDS: Record<string, string> = {

Callers 1

migrateFunction · 0.85

Calls 1

joinFunction · 0.85

Tested by

no test coverage detected