Result (@NotNull VirtualFile fileOrDir) { String relativeName = VfsUtilCore.getRelativePath(fileOrDir, contentRoot, '/'); for (Pattern module : excludePatterns.keySet()) { if (module == null || module.matcher(moduleName).matches()) { final Set<Pattern> dirPatterns = excludePatterns.get(module); for (Pattern pattern : dirPatterns) { if (pattern.matcher(relativeName).matches()) { contentEntry.addExcludeFolder(fileOrDir); return relativeName.isEmpty() ? CONTINUE : SKIP_CHILDREN; } } } } if (includePatterns.isEmpty()) return CONTINUE; for (Pattern module : includePatterns.keySet()) { if (module == null || module.matcher(moduleName).matches()) { final Set<Pattern> dirPatterns = includePatterns.get(module); for (Pattern pattern : dirPatterns) { if (pattern.matcher(relativeName).matches()) { included.add(fileOrDir); return CONTINUE; } } } } return CONTINUE; }