MCPcopy Index your code
hub / github.com/massCodeIO/massCode / isSqliteFile

Function isSqliteFile

src/main/utils/index.ts:22–33  ·  view source on GitHub ↗
(dbPath: string)

Source from the content-addressed store, hash-verified

20}
21
22export function isSqliteFile(dbPath: string): boolean {
23 try {
24 if (!fs.existsSync(dbPath))
25 return false
26
27 const buffer = fs.readFileSync(dbPath).subarray(0, 16)
28 return buffer.toString('ascii') === 'SQLite format 3\x00'
29 }
30 catch {
31 return false
32 }
33}

Callers 2

index.tsFile · 0.90
registerIPCFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected