/// <reference types="node" />
import { FileEntry, FolderEntry, WalkerEntry, FileHandler, FolderHandler, ErrorHandler, AsyncFilter, CollectorHandler } from './types';
export declare class FolderWalker<TFileResult = void, TFolderResult = void, TCollected = void> {
    private options;
    private fileHandler?;
    private folderHandler?;
    private errorHandler?;
    private rootPath?;
    private collectingFiles;
    private collectingFolders;
    private fileCollector?;
    private folderCollector?;
    withDepth(depth: number): this;
    withFilesOnly(): this;
    withFoldersOnly(): this;
    withFilesAndFolders(): this;
    withFileContents(encoding?: BufferEncoding): this;
    withExtensions(extensions: string[]): this;
    withPattern(pattern: RegExp): this;
    exclude(patterns: string[]): this;
    include(patterns: string[]): this;
    withHidden(): this;
    withSymlinks(): this;
    withMaxFileSize(bytes: number): this;
    withFilter<T extends WalkerEntry>(filter: AsyncFilter<T>): this;
    onFile<T>(handler: FileHandler<T>): FolderWalker<T, TFolderResult, TCollected>;
    onFolder<T>(handler: FolderHandler<T>): FolderWalker<TFileResult, T, TCollected>;
    onError(handler: ErrorHandler): this;
    withFileCollector(): FolderWalker<TFileResult, TFolderResult, TFileResult[]>;
    withFileCollector<R>(collector: CollectorHandler<TFileResult, R>): FolderWalker<TFileResult, TFolderResult, R>;
    withFolderCollector(): FolderWalker<TFileResult, TFolderResult, TFolderResult[]>;
    withFolderCollector<R>(collector: CollectorHandler<TFolderResult, R>): FolderWalker<TFileResult, TFolderResult, R>;
    execute(path: string): Promise<TCollected extends void ? void : TCollected>;
    files(path?: string): AsyncIterable<FileEntry>;
    folders(path?: string): AsyncIterable<FolderEntry>;
    entries(path?: string): AsyncIterable<WalkerEntry>;
    private createAsyncIterable;
    private walkIterator;
    private createFileEntry;
    private walk;
    private shouldProcess;
    private passesCustomFilters;
    private handleError;
}
