/** * Write JSON to a file atomically. The file is either the prior valid * contents or the new valid contents — never partially written — even * across power loss. * * Algorithm: write to a unique tmp file in the same directory, fsync * the data, then rename onto the target. POSIX `rename` is atomic * within a filesystem. * * The unique tmp suffix (pid + time + random) lets concurrent writes * for different targets coexist without collision. fsync is * best-effort — wrap in try/catch since some sandboxes don't support * it; the rename atomicity is the real guarantee. */ export declare function atomicWriteJson(filePath: string, data: unknown): void; //# sourceMappingURL=atomicWrite.d.ts.map