import type { DifyAccessor } from '../../accessor/dify.ts'; import type { IndexCacheStore } from '../../cache/index/store.ts'; import { PathSpec } from '../../types.ts'; export declare function segmentText(segment: Record): string; /** * Read a document, optionally only a byte range of it. * * A document is rendered here from its segments, so its bytes do not exist * until we make them and the window can only be taken afterwards, the same * way the rendered branches of gdrive, slack and discord take theirs. * * Args: * accessor: Dify accessor. * path: the path to read. * index: listing cache, consulted for the entry. * options: `{offset, size}`, the byte window, or absent for the whole file. */ export declare function readBytes(accessor: DifyAccessor, path: PathSpec | string, index?: IndexCacheStore, options?: { offset?: number; size?: number; }): Promise; export declare function readStream(accessor: DifyAccessor, path: PathSpec | string, index?: IndexCacheStore): AsyncIterable; //# sourceMappingURL=read.d.ts.map