boolean (VirtualFile file) { ProgressManager.checkCanceled(); if (Comparing.equal(file, virtualFileToIgnoreOccurrencesIn)) return true; int currentFilesCount = filesCount.incrementAndGet(); long accumulatedFileSizeToProcess = filesSizeToProcess.addAndGet(file.isDirectory() ? 0 : file.getLength()); return currentFilesCount < maxFilesToProcess && accumulatedFileSizeToProcess < maxFilesSizeToProcess; }