export declare class ExportCorruptionError extends Error { constructor(what: string); } export declare function ensureDir(dir: string): Promise; export declare function atomicWriteFile(file: string, content: string | Buffer): Promise; export declare function atomicWriteJson(file: string, value: unknown): Promise; export declare function readJsonIfExists(file: string): Promise; export declare function pathExists(file: string): Promise; export declare function removeIfExists(file: string): Promise; /** Append-only output file that tracks how many bytes it holds, so a checkpoint can record an exact offset. */ export declare class AppendFile { private readonly handle; bytes: number; private constructor(); /** `startAt` null starts an empty file; a number truncates an existing file back to that offset. */ static open(file: string, startAt: number | null): Promise; write(text: string): Promise; sync(): Promise; close(): Promise; } export declare function sha256File(file: string): Promise<{ sha256: string; bytes: number; }>; export interface LineWithOffset { offset: number; nextOffset: number; text: string; } /** Streams complete lines of a file starting at a byte offset, reporting exact byte offsets. */ export declare function readLinesFrom(file: string, startOffset: number): AsyncGenerator; export declare function removeFilesWithSuffix(root: string, suffix: string): Promise; //# sourceMappingURL=fsutil.d.ts.map