//#region ../@warlock.js/fs/src/atomic.d.ts /** * Write a file atomically. * * Writes to a uniquely-named sibling temp file first, then renames it onto * the target. Readers either see the old content or the complete new * content — never a half-written file. If anything fails mid-write the * temp file is cleaned up. * * Parent directories are created if missing. * * @example * await atomicWriteAsync("manifest.json", JSON.stringify(data)); */ declare function atomicWriteAsync(filePath: string, content: string | Buffer): Promise; /** * Atomic write convenience for JSON values (pretty-printed, 2-space indent). */ declare function atomicWriteJsonAsync(filePath: string, value: unknown): Promise; //#endregion export { atomicWriteAsync, atomicWriteJsonAsync }; //# sourceMappingURL=atomic.d.mts.map