/** * Write `content` to `path` atomically: write to a same-directory temp file, * then rename it over the target. A rename onto an existing file is atomic on * POSIX and on Windows (NTFS `MoveFileEx` with `MOVEFILE_REPLACE_EXISTING`, * which `fs.renameSync` requests), so a reader never observes a partially * written target. * * Windows can refuse the replace with `EPERM`/`EBUSY`/`EACCES` while another * process has the target file open without `FILE_SHARE_DELETE` (uncommon for * plain text files, but not impossible for a file an antivirus or indexer has * briefly opened). On that failure, falls back to a direct non-atomic * `writeFileSync`, which was the prior behavior everywhere this replaces a * plain `writeFileSync` call. * * The temp file is always cleaned up, on both the success and fallback paths. */ export declare function writeFileAtomicSync(path: string, content: string): void; //# sourceMappingURL=atomic-write.d.ts.map