///
///
import { NoParamCallback } from 'fs';
import { Dir, Dirent, FakeFS } from '../FakeFS';
import { Filename, Path } from '../path';
export type CustomDirOptions = {
onClose?: () => void;
};
export declare class CustomDir
implements Dir
{
readonly path: P;
private readonly nextDirent;
private readonly opts;
constructor(path: P, nextDirent: () => Dirent | null, opts?: CustomDirOptions);
closed: boolean;
throwIfClosed(): void;
[Symbol.asyncIterator](): AsyncGenerator;
read(): Promise;
read(cb: (err: NodeJS.ErrnoException | null, dirent: Dirent | null) => void): void;
readSync(): Dirent | null;
close(): Promise;
close(cb: NoParamCallback): void;
closeSync(): void;
}
export declare function opendir(fakeFs: FakeFS
, path: P, entries: Array, opts?: CustomDirOptions): CustomDir;