export type WriteMode = "ask" | "force" | "skip" | "append"; export interface WriteOptions { mode: WriteMode; } export declare function setWriteMode(mode: WriteMode): void; export declare function getWriteMode(): WriteMode; /** * Begin recording every write into the returned Set. Calls accumulate into the * same set until `stopRecordingWrites` runs. POSIX relative paths (relative to * `cwd`) are stored, matching `.template-hashes.json` keys. * * Nested recording sessions are NOT supported — the caller must ensure * `stopRecordingWrites` runs before the next `startRecordingWrites`. Failure * is silent (the second `start` replaces the first set), so callers should * always pair start/stop in try/finally. */ export declare function startRecordingWrites(cwd: string): Set; /** End recording. Subsequent writes are not captured until `start` is called again. */ export declare function stopRecordingWrites(): void; /** * Write file with conflict handling * - If file doesn't exist: write directly * - If file exists and content is identical: skip silently * - If file exists and mode is 'force': overwrite * - If file exists and mode is 'skip': skip * - If file exists and mode is 'append': append to end * - If file exists and mode is 'ask': prompt user */ export declare function writeFile(filePath: string, content: string, options?: { executable?: boolean; }): Promise; /** * Ensure directory exists */ export declare function ensureDir(dirPath: string): void; //# sourceMappingURL=file-writer.d.ts.map