boolean (@NotNull String path) { if (isEmpty()) { return false; } String localPrefix = normLocal(myLocalRoot); if (localPrefix.isEmpty()) { return false; } final String localPath = normLocal(path); final int prefixLength = localPrefix.length(); return localPath.startsWith(localPrefix) && (localPath.length() == prefixLength || localPath.charAt(prefixLength) == '/'); }