/** * Atomic File Write * * Write files atomically using write-to-temp-then-rename pattern. * Prevents corrupted config/cache files from crash-mid-write scenarios. * * @since v2.5.19 */ /** * Write a file atomically by writing to a temp file first, then renaming. * Rename is atomic on the same filesystem, so either the old or new content * is fully present — never a partial write. */ export declare function writeFileAtomic(filePath: string, content: string, options?: { mode?: number; }): Promise; /** * Synchronous version of writeFileAtomic for code that uses sync I/O. */ export declare function writeFileAtomicSync(filePath: string, content: string | Buffer, options?: { mode?: number; }): void; /** * Copy a file atomically: copy to temp, then rename. * Prevents partial JARs if the process crashes mid-copy. */ export declare function copyFileAtomic(src: string, dest: string): Promise; //# sourceMappingURL=atomic-write.d.ts.map