1 | import { MMRegExp } from 'minimatch';
|
2 | import { Path } from 'path-scurry';
|
3 | import { Pattern } from './pattern.js';
|
4 | import { GlobWalkerOpts } from './walker.js';
|
5 |
|
6 |
|
7 |
|
8 | export declare class HasWalkedCache {
|
9 | store: Map<string, Set<string>>;
|
10 | constructor(store?: Map<string, Set<string>>);
|
11 | copy(): HasWalkedCache;
|
12 | hasWalked(target: Path, pattern: Pattern): boolean | undefined;
|
13 | storeWalked(target: Path, pattern: Pattern): void;
|
14 | }
|
15 | /**
|
16 | * A record of which paths have been matched in a given walk step,
|
17 | * and whether they only are considered a match if they are a directory,
|
18 | * and whether their absolute or relative path should be returned.
|
19 | */
|
20 | export declare class MatchRecord {
|
21 | store: Map<Path, number>;
|
22 | add(target: Path, absolute: boolean, ifDir: boolean): void;
|
23 | entries(): [Path, boolean, boolean][];
|
24 | }
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare class SubWalks {
|
30 | store: Map<Path, Pattern[]>;
|
31 | add(target: Path, pattern: Pattern): void;
|
32 | get(target: Path): Pattern[];
|
33 | entries(): [Path, Pattern[]][];
|
34 | keys(): Path[];
|
35 | }
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | export declare class Processor {
|
43 | hasWalkedCache: HasWalkedCache;
|
44 | matches: MatchRecord;
|
45 | subwalks: SubWalks;
|
46 | patterns?: Pattern[];
|
47 | follow: boolean;
|
48 | dot: boolean;
|
49 | opts: GlobWalkerOpts;
|
50 | constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache);
|
51 | processPatterns(target: Path, patterns: Pattern[]): this;
|
52 | subwalkTargets(): Path[];
|
53 | child(): Processor;
|
54 | filterEntries(parent: Path, entries: Path[]): Processor;
|
55 | testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void;
|
56 | testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void;
|
57 | testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void;
|
58 | }
|
59 | //# sourceMappingURL=processor.d.ts.map |
\ | No newline at end of file |