export interface AtomicWriteOptions { encoding?: BufferEncoding; mode?: number; tmpfileCreated?: (tmpfile: string) => void; } /** * Atomically writes data to a file using the temp-file-and-rename strategy. * This ensures that the file is either fully written or not written at all, * preventing partial writes and corruption. * * @param filePath - The path to the file to write * @param data - The data to write (string or Buffer) * @param options - Optional write options */ export declare function writeFileAtomic(filePath: string, data: string | Buffer, options?: AtomicWriteOptions): Promise; /** * Synchronously writes data to a file atomically. * Not recommended for large files or performance-critical paths. */ export declare function writeFileAtomicSync(filePath: string, data: string | Buffer, options?: Omit): void; export default writeFileAtomic; //# sourceMappingURL=atomic-write.d.ts.map