@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
25 lines • 1.13 kB
TypeScript
import type { LinkView, MountView } from '../../../../view/types.ts';
import { PathSpec, type StatFn } from '../../../../types.ts';
import type { Scan, Walked } from './types.ts';
export declare const OTHER_FILESYSTEM = "file is on a different filesystem; not dumped";
export type WalkFn = (path: PathSpec, findType: string) => Promise<Walked>;
export type DirProbe = (path: PathSpec) => Promise<boolean>;
export interface ScanDeps {
stat: StatFn;
walk: WalkFn;
links?: LinkView | null;
mounts?: MountView | null;
dereference: boolean;
recurse: boolean;
}
/**
* Everything one operand contributes to an archive.
*
* This is the whole of what tar and zip share: which paths go in, what each
* one is, and which of them could not be reached. The two formats disagree
* about the defaults, not the traversal, so both are parameters: tar stores a
* symlink unless `-h` says to follow it and always descends, zip follows
* unless `-y` says otherwise and only descends under `-r`.
*/
export declare function scanOperand(path: PathSpec, deps: ScanDeps): Promise<Scan>;
//# sourceMappingURL=walk.d.ts.map