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

Function ensureDir

packages/cli/src/adapters/pi.ts:218–224  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

216}
217
218function ensureDir(filePath: string): void {
219 const dir = dirname(filePath);
220 if (!existsSync(dir)) {
221 const { mkdirSync } = require("node:fs") as typeof import("node:fs");
222 mkdirSync(dir, { recursive: true });
223 }
224}
225
226// SETTINGS_BASENAME is exported for tests that need it.
227export { SETTINGS_BASENAME };

Callers 1

writePiSettingsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected