import { type ResourceIgnoreMatcher } from "./resource-ignore.ts"; export interface ResourceDirectoryRecord { readonly name: string; isDirectory(): boolean; isFile(): boolean; isSymbolicLink(): boolean; } export interface ResourceStatRecord { isDirectory(): boolean; isFile(): boolean; } /** Filesystem boundary used by resource discovery and deterministic traversal tests. */ export interface ResourceTraversalPort { pathExists(path: string): boolean; readDirectory(path: string): readonly ResourceDirectoryRecord[]; stat(path: string): ResourceStatRecord; } export interface ResourceDirectoryEntry { name: string; path: string; isDirectory: boolean; isFile: boolean; isSymbolicLink: boolean; } export interface ResourceTraversalOptions { followSymbolicLinks?: boolean; ignoreMatcher?: ResourceIgnoreMatcher; onDirectoryReadError?: (path: string, error: unknown) => void; port?: ResourceTraversalPort; rootDir?: string; skipHidden?: boolean; skipNodeModules?: boolean; } /** Lexically classify a path under a resource root without accepting prefix-sharing siblings. */ export declare function isResourcePathWithin(target: string, root: string): boolean; /** * Read and classify one directory once. Unreadable directories and broken links are omitted, * matching resource discovery's best-effort startup contract. */ export declare function readResourceDirectory(dir: string, options?: ResourceTraversalOptions): ResourceDirectoryEntry[]; /** Collect matching files with one accumulator; nested walks never copy completed prefixes. */ export declare function collectResourceFilesRecursively(dir: string, matchesFile: (entry: ResourceDirectoryEntry) => boolean, options?: ResourceTraversalOptions): string[]; //# sourceMappingURL=resource-traversal.d.ts.map