1 import micromatch = require('micromatch');
\r
2 import { Pattern, PatternRe } from '../types/patterns';
\r
4 * Return true for static pattern.
\r
6 export declare function isStaticPattern(pattern: Pattern): boolean;
\r
8 * Return true for pattern that looks like glob.
\r
10 export declare function isDynamicPattern(pattern: Pattern): boolean;
\r
12 * Convert a windows «path» to a unix-style «path».
\r
14 export declare function unixifyPattern(pattern: Pattern): Pattern;
\r
16 * Returns negative pattern as positive pattern.
\r
18 export declare function convertToPositivePattern(pattern: Pattern): Pattern;
\r
20 * Returns positive pattern as negative pattern.
\r
22 export declare function convertToNegativePattern(pattern: Pattern): Pattern;
\r
24 * Return true if provided pattern is negative pattern.
\r
26 export declare function isNegativePattern(pattern: Pattern): boolean;
\r
28 * Return true if provided pattern is positive pattern.
\r
30 export declare function isPositivePattern(pattern: Pattern): boolean;
\r
32 * Extracts negative patterns from array of patterns.
\r
34 export declare function getNegativePatterns(patterns: Pattern[]): Pattern[];
\r
36 * Extracts positive patterns from array of patterns.
\r
38 export declare function getPositivePatterns(patterns: Pattern[]): Pattern[];
\r
40 * Extract base directory from provided pattern.
\r
42 export declare function getBaseDirectory(pattern: Pattern): string;
\r
44 * Return true if provided pattern has globstar.
\r
46 export declare function hasGlobStar(pattern: Pattern): boolean;
\r
48 * Return true if provided pattern ends with slash and globstar.
\r
50 export declare function endsWithSlashGlobStar(pattern: Pattern): boolean;
\r
52 * Returns «true» when pattern ends with a slash and globstar or the last partial of the pattern is static pattern.
\r
54 export declare function isAffectDepthOfReadingPattern(pattern: Pattern): boolean;
\r
56 * Return naive depth of provided pattern without depth of the base directory.
\r
58 export declare function getNaiveDepth(pattern: Pattern): number;
\r
60 * Return max naive depth of provided patterns without depth of the base directory.
\r
62 export declare function getMaxNaivePatternsDepth(patterns: Pattern[]): number;
\r
64 * Make RegExp for provided pattern.
\r
66 export declare function makeRe(pattern: Pattern, options: micromatch.Options): PatternRe;
\r
68 * Convert patterns to regexps.
\r
70 export declare function convertPatternsToRe(patterns: Pattern[], options: micromatch.Options): PatternRe[];
\r
72 * Returns true if the entry match any of the given RegExp's.
\r
74 export declare function matchAny(entry: string, patternsRe: PatternRe[]): boolean;
\r