1 import { EntryItem } from '../types/entries';
\r
2 import { Pattern } from '../types/patterns';
\r
3 export declare type TransformFunction<T> = (entry: EntryItem) => T;
\r
4 export interface IOptions<T = EntryItem> {
\r
6 * The current working directory in which to search.
\r
10 * The deep option can be set to true to traverse the entire directory structure,
\r
11 * or it can be set to a number to only traverse that many levels deep.
\r
13 deep: number | boolean;
\r
15 * Add an array of glob patterns to exclude matches.
\r
19 * Allow patterns to match filenames starting with a period (files & directories),
\r
20 * even if the pattern does not explicitly have a period in that spot.
\r
24 * Return `fs.Stats` with `path` property instead of file path.
\r
28 * Return only files.
\r
32 * Return only directories.
\r
34 onlyDirectories: boolean;
\r
36 * Follow symlinked directories when expanding `**` patterns.
\r
38 followSymlinkedDirectories: boolean;
\r
40 * Prevent duplicate results.
\r
44 * Add a `/` character to directory entries.
\r
46 markDirectories: boolean;
\r
48 * Return absolute paths for matched entries.
\r
52 * Disable expansion of brace patterns.
\r
56 * Enable expansion of brace patterns.
\r
60 * Disable matching with globstars (`**`).
\r
62 noglobstar: boolean;
\r
64 * Enable matching with globstars (`**`).
\r
68 * Disable extglob support, so that extglobs are regarded as literal characters.
\r
72 * Enable extglob support, so that extglobs are regarded as literal characters.
\r
76 * Disable a case-insensitive regex for matching files.
\r
80 * Enable a case-insensitive regex for matching files.
\r
84 * Allow glob patterns without slashes to match a file path based on its basename.
\r
85 * For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
\r
89 * Allows you to transform a path or `fs.Stats` object before sending to the array.
\r
91 transform: TransformFunction<T> | null;
\r
93 export declare type IPartialOptions<T = EntryItem> = Partial<IOptions<T>>;
\r
94 export declare function prepare(options?: IPartialOptions): IOptions;
\r