MCPcopy
hub / github.com/21st-dev/1code / getDatabasePath

Function getDatabasePath

src/main/lib/db/index.ts:15–25  ·  view source on GitHub ↗

* Get the database path in the app's user data directory

()

Source from the content-addressed store, hash-verified

13 * Get the database path in the app's user data directory
14 */
15function getDatabasePath(): string {
16 const userDataPath = app.getPath("userData")
17 const dataDir = join(userDataPath, "data")
18
19 // Ensure data directory exists
20 if (!existsSync(dataDir)) {
21 mkdirSync(dataDir, { recursive: true })
22 }
23
24 return join(dataDir, "agents.db")
25}
26
27/**
28 * Get the migrations folder path

Callers 1

initDatabaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected