/** * Filesystem write helpers shared across Dreamux providers and host. * * Domain note: these are atomic-write primitives, one per publish semantic * (create-only vs. overwrite). Dreamux host-owned path/layout contracts live * in `@excitedjs/dreamux` — do not add them here. */ /** * Publish a complete file without ever replacing an existing target: write * the full contents to a sibling temp file, then `link()` it into place. * `link()` either creates the destination name or fails — there is no window * where a reader can see a partial file, and no window where two concurrent * publishers can both "win". A collision surfaces as `EEXIST`, reported here * as `false` rather than thrown, because "someone else already published this * path" is the expected outcome of a no-clobber create, not an I/O failure. */ export declare function publishFileExclusive(path: string, data: string, options?: { mode?: number; }): Promise; /** * Write a complete file to `path`, replacing whatever is already there: the * full contents land in a sibling temp file first, then `rename()` swaps it * over the target. A reader never observes a partial write, and a write that * fails partway leaves the previous file, if any, untouched. This is the * overwrite counterpart to `publishFileExclusive` above — same tmp+publish * shape, but `rename()` replaces an existing target instead of `link()` * refusing one. */ export declare function writeFileAtomic(path: string, data: string, options?: { mode?: number; }): Promise; //# sourceMappingURL=fs.d.ts.map