import { IndexEntry } from '@struktoai/mirage-core/cache/index/config'; import type { IndexCacheStore } from '@struktoai/mirage-core/cache/index/store'; import type { HfHubAccessor } from '../../accessor/hf_hub.ts'; /** * What sits at one mount-absolute key. * * `entry` is null for a directory the tree implies but has no row of its own * for, which is why a caller must read `isDir` and `exists` rather than * testing `entry` for truth. */ export interface Found { entry: IndexEntry | null; children: string[] | null; } export declare function isDir(found: Found): boolean; /** * Resolve one mount-absolute key against the mount's listing. * * The single place the two storage paths are told apart: a workspace mount * answers from its seeded index, and a mount built without one answers from * tables derived from the accessor's tree. Both are built by `indexRows`, so * they cannot disagree. */ export declare function lookup(accessor: HfHubAccessor, index: IndexCacheStore | undefined, prefix: string, key: string): Promise; /** The mount-absolute key for a mount-local path. */ export declare function keyOf(prefix: string, local: string): string; /** Whether a mount-local path exists as a non-directory. */ export declare function probeFile(accessor: HfHubAccessor, index: IndexCacheStore | undefined, prefix: string, local: string): Promise; /** Whether a mount-local path exists as a directory. */ export declare function probeDir(accessor: HfHubAccessor, index: IndexCacheStore | undefined, prefix: string, local: string): Promise; /** A row for a directory the tree implies but has no row for. */ export declare function dirStatEntry(key: string): IndexEntry; //# sourceMappingURL=lookup.d.ts.map