@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
19 lines • 695 B
TypeScript
import type { RAMAccessor } from '../../accessor/ram.ts';
import { type PathSpec } from '../../types.ts';
/**
* Read a file, optionally only a byte range of it.
*
* The bytes are already in memory, so the window is a slice rather than a
* smaller fetch. It is taken here anyway so a RAM mount answers a windowed
* read the same way every other backend does.
*
* Args:
* accessor: RAM accessor.
* path: the path to read.
* options: `{offset, size}`, the byte window, or absent for the whole file.
*/
export declare function read(accessor: RAMAccessor, path: PathSpec, options?: {
offset?: number;
size?: number;
}): Promise<Uint8Array>;
//# sourceMappingURL=read.d.ts.map