boolean (@NotNull FilePath filePath) { String path = filePath.getPath(); if (!isParentOf(myRoot, path, myCaseSensitive)) { return false; } if (myEverythingDirty) { return true; } if (path.length() == myRoot.length()) { return false; // myEverythingDirty == false } int startIndex = myRoot.length() + 1; int index = startIndex; int lastPrefixHash = 0; while (index < path.length()) { int nextIndex = path.indexOf('/', index + 1); if (nextIndex == -1) nextIndex = path.length(); int prefixHash = FilePathHashUtil.pathHashCode(myCaseSensitive, path, index, nextIndex, lastPrefixHash); if (myPathHashSet.contains(prefixHash)) { String prefix = path.substring(startIndex, nextIndex); if (myPaths.contains(prefix)) return true; } index = nextIndex; lastPrefixHash = prefixHash; } return false; }