• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/// <reference types="node" resolution-mode="require"/>
2import { GLOBSTAR } from 'minimatch';
3export type MMPattern = string | RegExp | typeof GLOBSTAR;
4export type PatternList = [p: MMPattern, ...rest: MMPattern[]];
5export type UNCPatternList = [
6    p0: '',
7    p1: '',
8    p2: string,
9    p3: string,
10    ...rest: MMPattern[]
11];
12export type DrivePatternList = [p0: string, ...rest: MMPattern[]];
13export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]];
14export type GlobList = [p: string, ...rest: string[]];
15/**
16 * An immutable-ish view on an array of glob parts and their parsed
17 * results
18 */
19export declare class Pattern {
20    #private;
21    readonly length: number;
22    constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform);
23    /**
24     * The first entry in the parsed list of patterns
25     */
26    pattern(): MMPattern;
27    /**
28     * true of if pattern() returns a string
29     */
30    isString(): boolean;
31    /**
32     * true of if pattern() returns GLOBSTAR
33     */
34    isGlobstar(): boolean;
35    /**
36     * true if pattern() returns a regexp
37     */
38    isRegExp(): boolean;
39    /**
40     * The /-joined set of glob parts that make up this pattern
41     */
42    globString(): string;
43    /**
44     * true if there are more pattern parts after this one
45     */
46    hasMore(): boolean;
47    /**
48     * The rest of the pattern after this part, or null if this is the end
49     */
50    rest(): Pattern | null;
51    /**
52     * true if the pattern represents a //unc/path/ on windows
53     */
54    isUNC(): boolean;
55    /**
56     * True if the pattern starts with a drive letter on Windows
57     */
58    isDrive(): boolean;
59    /**
60     * True if the pattern is rooted on an absolute path
61     */
62    isAbsolute(): boolean;
63    /**
64     * consume the root of the pattern, and return it
65     */
66    root(): string;
67    /**
68     * Check to see if the current globstar pattern is allowed to follow
69     * a symbolic link.
70     */
71    checkFollowGlobstar(): boolean;
72    /**
73     * Mark that the current globstar pattern is following a symbolic link
74     */
75    markFollowGlobstar(): boolean;
76}
77//# sourceMappingURL=pattern.d.ts.map