UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

9 lines • 722 B
import { PathSpec, type FileStat } from '../../../types.ts'; import type { CommandFnResult, Context } from '../../config.ts'; /** What patch changes on a path besides writing it. */ type PatchChanges = Readonly<Record<'mkdir' | 'unlink' | 'rmdir', (p: PathSpec) => Promise<void>>>; /** How patch sets a file's permission bits. */ type PatchChmod = (p: PathSpec, mode: number) => Promise<void>; export declare function patchGeneric(paths: PathSpec[], ctx: Context, read: (p: PathSpec) => Promise<Uint8Array>, write: (p: PathSpec, data: Uint8Array) => Promise<void>, stat: (p: PathSpec) => Promise<FileStat>, changes: PatchChanges, chmod: PatchChmod): Promise<CommandFnResult>; export {}; //# sourceMappingURL=patch.d.ts.map