private static @Nullable Path firstExistingParent(@NotNull Path parent) {
          Path firstExistingParent = parent.toAbsolutePath();
          while (firstExistingParent != null && !Files.exists(firstExistingParent)) {
            firstExistingParent = firstExistingParent.getParent();
          }
          return firstExistingParent;
        }
private static @Nullable Path firstExistingParent(@NotNull Path parent)