1 import micromatch = require('micromatch');
\r
2 import { IOptions } from '../../managers/options';
\r
3 import { FilterFunction } from '@mrmlnc/readdir-enhanced';
\r
4 import { Pattern } from '../../types/patterns';
\r
5 export default class DeepFilter {
\r
6 private readonly options;
\r
7 private readonly micromatchOptions;
\r
8 constructor(options: IOptions, micromatchOptions: micromatch.Options);
\r
10 * Returns filter for directories.
\r
12 getFilter(positive: Pattern[], negative: Pattern[]): FilterFunction;
\r
14 * Returns max depth of the provided patterns.
\r
16 private getMaxPatternDepth;
\r
18 * Returns RegExp's for patterns that can affect the depth of reading.
\r
20 private getNegativePatternsRe;
\r
22 * Returns «true» for directory that should be read.
\r
26 * Returns «true» when the «deep» option is disabled or number and depth of the entry is greater that the option value.
\r
28 private isSkippedByDeepOption;
\r
30 * Returns «true» when depth parameter is not an Infinity and entry depth greater that the parameter value.
\r
32 private isSkippedByMaxPatternDepth;
\r
34 * Returns «true» for symlinked directory if the «followSymlinkedDirectories» option is disabled.
\r
36 private isSkippedSymlinkedDirectory;
\r
38 * Returns «true» for a directory whose name starts with a period if «dot» option is disabled.
\r
40 private isSkippedDotDirectory;
\r
42 * Returns «true» for a directory whose path math to any negative pattern.
\r
44 private isSkippedByNegativePatterns;
\r