UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

34 lines • 1.93 kB
import type { ChildMounts } from '../../../view/types.ts'; import type { DispatchFn } from '../../../runtime/types.ts'; import type { DirProbe, WalkFn } from '../generic/archive/walk.ts'; import type { CommandFiles } from './files.ts'; import { type ReadTree } from '../utils/tree.ts'; /** * The subtree listing tar and zip both walk with. * * Reuses find's walk so an archiver classifies an entry exactly the way find * does (through stat, never by name). The two calls a directory operand makes * share one readdir cache, so the second is answered from the index instead of * the backend. * * walkFind stands in for a backend's native find op, so it answers in * mount-relative keys; both archivers name members from virtual paths, so they * are lifted back here the way findGeneric lifts them. A directory the walk * could not open rides along (as the virtual path the walk recorded), so the * archiver can report it the way GNU does instead of silently leaving its * contents out. The files listed are every file the archiver reads, so the * mount that owns the operand may refuse the walk before they are listed. */ export declare function walkOf(files: CommandFiles, dispatch: DispatchFn | undefined, command: string): WalkFn; export declare function isDirOf(files: CommandFiles): DirProbe; /** * The subtree listing tar and zip walk with when a line spans mounts. * * Every directory is listed on the mount that owns it, so operands from * several mounts go into one archive, and find's walk classifies what it * lists exactly as it does on one backend. `readTree` is the walk's subtree * read (`dispatchedReadTree`); undefined lists every directory. */ export declare function relayWalkOf(dispatch: DispatchFn, owed: ChildMounts | undefined, command: string, readTree?: ReadTree): WalkFn; export declare function relayIsDirOf(dispatch: DispatchFn): DirProbe; //# sourceMappingURL=archive_io.d.ts.map