UNPKG

1.11 kBTypeScriptView Raw
1import * as fsScandir from '@nodelib/fs.scandir';
2import type { Entry, ErrnoException } from './types';
3export type FilterFunction<T> = (value: T) => boolean;
4export type DeepFilterFunction = FilterFunction<Entry>;
5export type EntryFilterFunction = FilterFunction<Entry>;
6export type ErrorFilterFunction = FilterFunction<ErrnoException>;
7export interface Options {
8 basePath?: string;
9 concurrency?: number;
10 deepFilter?: DeepFilterFunction;
11 entryFilter?: EntryFilterFunction;
12 errorFilter?: ErrorFilterFunction;
13 followSymbolicLinks?: boolean;
14 fs?: Partial<fsScandir.FileSystemAdapter>;
15 pathSegmentSeparator?: string;
16 stats?: boolean;
17 throwErrorOnBrokenSymbolicLink?: boolean;
18}
19export declare class Settings {
20 readonly basePath?: string;
21 readonly concurrency: number;
22 readonly deepFilter: DeepFilterFunction | null;
23 readonly entryFilter: EntryFilterFunction | null;
24 readonly errorFilter: ErrorFilterFunction | null;
25 readonly pathSegmentSeparator: string;
26 readonly fsScandirSettings: fsScandir.Settings;
27 constructor(options?: Options);
28}