UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

20 lines • 1.32 kB
export declare function readFileBytes(path: string): Promise<Uint8Array>; export declare function writeFileBytes(path: string, data: Uint8Array): Promise<void>; export declare function fileSize(path: string): Promise<number>; /** The bytes of a host file a state named, opened as `openRegular` opens it. */ export declare function readRegular(path: string): Promise<Uint8Array>; /** The file at `path`, opened as `openRegular` opens it, a chunk at a time. */ export declare function regularChunks(path: string): AsyncGenerator<Uint8Array>; /** Write `source` to a file at `path`, chunk by chunk; returns the bytes written. */ export declare function writeStreamToFile(path: string, source: ReadableStream<Uint8Array>): Promise<number>; /** The file at `path`, a chunk at a time. */ export declare function fileChunks(path: string): AsyncGenerator<Uint8Array>; /** A fresh directory under the system temp dir, for staging a restore. */ /** * Where blob `name` is staged under `staging`, its directory made; a name * landing outside it, as written or through a link, is refused. */ export declare function stagedPath(staging: string, name: string): Promise<string>; export declare function makeStagingDir(): Promise<string>; export declare function removeDir(path: string): Promise<void>; //# sourceMappingURL=fs.d.ts.map