MCPcopy
hub / github.com/ericc-ch/copilot-api / ensureFile

Function ensureFile

src/lib/paths.ts:19–26  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

17}
18
19async function ensureFile(filePath: string): Promise<void> {
20 try {
21 await fs.access(filePath, fs.constants.W_OK)
22 } catch {
23 await fs.writeFile(filePath, "")
24 await fs.chmod(filePath, 0o600)
25 }
26}

Callers 1

ensurePathsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…