(filePath: string)
| 216 | } |
| 217 | |
| 218 | function 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. |
| 227 | export { SETTINGS_BASENAME }; |