import type { Accessor } from '../../accessor/base.ts';
import type { FileStat } from '../../types.ts';
import { DirListing, PathSpec } from '../../types.ts';
export type ReaddirFn<A extends Accessor> = (accessor: A, pathSpec: PathSpec, entry?: FileStat | null, parent?: FileStat | null, limit?: number) => Promise<FileStat[] | DirListing>;
/** The PathSpec of the directory holding `path`, on the same mount. */
export declare function parentSpec(path: PathSpec): PathSpec;
/** The listed directory's own children, whichever shape listed them. */
export declare function rowsOf(listed: readonly FileStat[] | DirListing): readonly FileStat[];
/**
 * What is at the file `path`, as its parent's listing named it. Throws ENOENT
 * when nothing is there and EISDIR when a folder is. Mirrors Python's
 * `file_entry`.
 */
export declare function fileEntry(path: PathSpec, entry: FileStat | null | undefined): FileStat;
/**
 * What is at `path` and at its parent, as each level's listing names it,
 * listed from the mount root down: a walk that starts below the root hands
 * its first directory these. The mount root is no listing's child, so it
 * answers nothing; a name a level does not list answers no row at `path`.
 * Mirrors Python's `row_at`.
 */
export declare function rowAt<A extends Accessor>(readdir: ReaddirFn<A>, accessor: A, path: PathSpec): Promise<[FileStat | null, FileStat | null]>;
//# sourceMappingURL=probe.d.ts.map