UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

22 lines • 1.62 kB
import type { PathSpec } from '../../types.ts'; import { type FsError } from '../../errors/types.ts'; import type { RedisStoreLike } from '../../vfs/redis/store.ts'; export declare function checkDestParents(store: RedisStoreLike, dst: PathSpec, d: string): Promise<void>; export declare function checkRename(store: RedisStoreLike, src: PathSpec, s: string, dst: PathSpec, d: string): Promise<void>; export declare function lookupError(store: RedisStoreLike, spec: PathSpec, key: string): Promise<FsError>; export declare function checkWriteTarget(store: RedisStoreLike, spec: PathSpec, key: string): Promise<void>; export declare function checkMkdirTarget(store: RedisStoreLike, spec: PathSpec, key: string, parents: boolean): Promise<void>; /** * Keep what a directory op left under `p` inside its directories. The op * lists before it acts, so a key written under `p` meanwhile stays while the * op removes the directories above it, and a key under no recorded directory * is the orphan `checkDestParents` refuses. Each directory from `p` down to * such a key is recorded again, as `mkdir -p` records it, unless a file took * its name since: that file is not hidden behind a directory. The op drops a * removed directory's metadata only after this, so a kept one keeps its time * and attributes. Returns the names whose metadata stays: each directory kept * or still standing under `p`, and any file that took one's name; empty when * nothing was left. Mirrors Python's `keep_left`. */ export declare function keepLeft(store: RedisStoreLike, p: string): Promise<Set<string>>; //# sourceMappingURL=dest.d.ts.map