UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

22 lines • 1.07 kB
import type { GitHubAccessor } from '../../accessor/github.ts'; import { DirListing, type FileStat, type PathSpec } from '../../types.ts'; /** * A folder's listing, with every folder below it as seeds. * * One recursive tree answers the whole repository at the head it names, so * the listing carries that head as its version. A tree GitHub truncated names * only some paths; the folder is then read from its own tree, asked by its * path at the ref so it is as current as the request (a sha from an older * parent listing is not), and once a mount has seen its tree truncated it asks * no recursive tree again. GitHub answers a repository the token can no longer * read as it answers a missing path, so a folder is missing only while the ref * itself still resolves. * * Mirrors Python's `readdir`. * * Throws: * NotADirectoryError: a file is at the path. * FileNotFoundError: nothing is. */ export declare function readdir(accessor: GitHubAccessor, path: PathSpec, entry?: FileStat | null): Promise<DirListing>; //# sourceMappingURL=readdir.d.ts.map