import { type Stats } from "node:fs"; /** Compare the filesystem identity and mutation-sensitive metadata captured around a bounded read. */ export declare function sameFileVersion(left: Stats, right: Stats): boolean; /** Read at most `maxBytes`, then probe one byte so a growing file cannot escape the bound. */ export declare function readFileDescriptorBoundedSync(fileDescriptor: number, maxBytes: number): Buffer | undefined; /** Bounded, version-stable text read for small durable state files. */ export declare function readBoundedTextFileSync(filePath: string, maxBytes: number, label: string): string; export interface BoundedFilePrefix { content: Buffer; truncated: boolean; } /** Read one stable file prefix without allocating or reading beyond `maxBytes`. */ export declare function readFilePrefixSync(filePath: string, maxBytes: number, label: string): BoundedFilePrefix; /** Count text lines with constant memory and reject a file that changes during the scan. */ export declare function countFileLinesSync(filePath: string, label: string): number; /** * Enumerate a managed directory incrementally. Unlike `readdirSync`, this never allocates an * unbounded entry array before the caller can reject a corrupt or hostile directory. */ export declare function readBoundedDirectoryNamesSync(directoryPath: string, maxEntries: number, label: string): string[]; /** Async counterpart of {@link readBoundedTextFileSync}. */ export declare function readBoundedTextFile(filePath: string, maxBytes: number, label: string): Promise; //# sourceMappingURL=bounded-file.d.ts.map