/** * Smart file writing utilities with change detection * Only writes files when meaningful content has changed, ignoring timestamp differences */ /** * Strips timestamp patterns from content for comparison purposes * This allows comparing file content while ignoring generated timestamps * * @param content - The file content to process * @returns Content with timestamp patterns replaced with a placeholder */ export declare function stripTimestamps(content: string): string; /** * Checks if content has changed by comparing without timestamps * * @param existingContent - The current file content (may be undefined if file doesn't exist) * @param newContent - The new content to compare * @returns True if the meaningful content has changed */ export declare function hasContentChanged(existingContent: string | undefined, newContent: string): boolean; /** * Result of a smart write operation */ export interface SmartWriteResult { /** Whether the file was written (true) or skipped (false) */ written: boolean; /** The file path */ filePath: string; } /** * Writes a file only if its meaningful content has changed * Compares content excluding timestamps to avoid unnecessary writes * * @param filePath - Path to the file to write * @param content - New content to write * @returns Promise resolving to write result indicating if file was written */ export declare function smartWriteFile(filePath: string, content: string): Promise; /** * Writes multiple files, only if their meaningful content has changed * Processes all files in parallel for performance * * @param files - Array of file path and content pairs * @returns Promise resolving to array of write results */ export declare function smartWriteFiles(files: ReadonlyArray<{ filePath: string; content: string; }>): Promise>; /** * Writes a file only if its meaningful content has changed * Compatible version that returns Promise for drop-in replacement of fs.writeFile * * @param filePath - Path to the file to write * @param content - New content to write * @returns Promise resolving when operation completes */ export declare function smartWriteFileCompat(filePath: string, content: string): Promise;