/** * Publish a staged sibling without moving the old destination aside, so readers * never observe a missing file while transient Windows replacement denials clear. */ export declare function replaceFileWithRetry(tempPath: string, targetPath: string): Promise; /** * Publish a staged sibling file atomically, preserving an existing destination * across Windows `EPERM`/`EEXIST` replacement failures. */ export declare function replaceFileAtomically(tempPath: string, targetPath: string): Promise; /** * Write a file through a private temp sibling and publish it with a single * rename, so a reader never observes a half-written file and a failed write * leaves the destination untouched. * * The staged file is created with `mode` (0600 by default) and published with * that mode, so the destination stays readable only by its owner even when it * carries a secret. */ export declare function writeFileAtomically(filePath: string, content: string, mode?: number): Promise; /** * Synchronous sibling of {@link writeFileAtomically} for callers that cannot * await, such as the boot-time config migration. */ export declare function writeFileAtomicallySync(filePath: string, content: string, mode?: number): void; /** * Move a live file across devices without exposing a partial destination. * The source remains authoritative while the copy is staged. Publication and * source removal are synchronous so in-process writers cannot land between them. */ export declare function moveFileAcrossDevices(source: string, destination: string): Promise; /** * Move a finished file across devices, replacing a same-named destination. The copy is staged beside the destination * and published in one rename, so a failure before publication leaves the destination as it was. Once published, a * source that cannot be removed is logged rather than failing the move. */ export declare function replaceFileAcrossDevices(source: string, destination: string): Promise;