/** Lock-safe, atomic filesystem mutations used by the web server. */ import { type RootMeta } from "../utils/dag.js"; export { writeTextAtomic } from "../utils/storage-utils.js"; /** Atomically replace a text file while holding its advisory lock. */ export declare function writeTextLocked(filePath: string, content: string): Promise; /** Remove a file while holding the same advisory lock writers use. */ export declare function removeFileLocked(filePath: string): Promise; /** * Acquire several file locks in deterministic lexical order to avoid deadlock. */ export declare function withFileLocks(filePaths: string[], fn: () => T | Promise): Promise; /** * Read-modify-write root meta.json while holding one lock for the whole * validation and mutation transaction. */ export declare function mutateRootMetaLocked(dataDir: string, mutate: (rootMeta: RootMeta) => T | Promise): Promise; //# sourceMappingURL=storage.d.ts.map