private static @Nullable VirtualFile getExistingFileOrParent(@NotNull FilePath filePath) {
    VirtualFile file = filePath.getVirtualFile();
    if (file != null) return file;
    return filePath.getVirtualFileParent();
  }
private static @Nullable VirtualFile getExistingFileOrParent(@NotNull FilePath filePath)