public bool IsIncluded(string name, string path, ItemType type) { int depth = PathHelper.ChildDepth(DirectoryPath, path); return(Includes.IsMatch(name, path, type) && !Excludes.IsMatch(name, path, type) && depth > 0 && depth <= ScanDepth); }