/** Injected filesystem primitives — narrow and synchronous, so ordering and * failure paths are testable without a real disk race. */ export interface AtomicFsDeps { /** Current bytes at `path`, or `undefined` when it does not exist. */ readConfig(path: string): Buffer | undefined; createTemp(path: string): string; write(path: string, bytes: Buffer): void; fsync(path: string): void; /** Flush the directory ENTRY created by a rename, not the file's contents. * Syncing the file only guarantees its bytes survive; on several filesystems * the rename that gives those bytes their name is a separate metadata update * that a power loss can still lose. */ fsyncDir(path: string): void; rename(from: string, to: string): void; remove(path: string): void; } export declare function realFsDeps(): AtomicFsDeps; /** Replace `path`'s contents with `bytes`, atomically. Any failure leaves the * original bytes untouched and removes the temp file. */ export declare function atomicWriteBytes(fs: AtomicFsDeps, path: string, bytes: Buffer): void; //# sourceMappingURL=atomic-write.d.ts.map