private static void walkParents(@NotNull File file, Predicate<? super File> stopCondition, @NotNull Consumer<? super File> fileConsumer) {
    File current = file;
    while (true) {
      fileConsumer.consume(current);
      if (stopCondition.test(current)) break;
      current = current.getParentFile();
    }
  }
private static void walkParents(@NotNull File file, Predicate<? super File> stopCondition, @NotNull Consumer<? super File> fileConsumer)