UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

15 lines • 966 B
import { ByteSpool } from '../../io/spool.ts'; import type { ByteSource } from '../../io/types.ts'; import type { ReplaceRequest } from '../../cache/types.ts'; import type { BoxAccessor } from '../../accessor/box.ts'; import { type FileStat, type PathSpec } from '../../types.ts'; import type { Handed } from '../../vfs/types.ts'; /** * Upload a new file, or a new version of an existing one. A held version goes * out as the file's etag. A stream is spooled first, as an upload sends its * length; `signal` stops it. Answers the stored file's stat, null for a reply * that names none. Mirrors Python's `write`. */ export declare function write(accessor: BoxAccessor, path: PathSpec, data: ByteSource | ByteSpool, handed?: Handed, signal?: AbortSignal): Promise<FileStat | null>; export declare function replace(accessor: BoxAccessor, request: ReplaceRequest, handed?: Handed, signal?: AbortSignal): Promise<FileStat | null>; //# sourceMappingURL=write.d.ts.map