static VirtualFile @NotNull [] getPathComponents(@NotNull VirtualFile file) {
    List<VirtualFile> componentsList = new ArrayList<>();
    while (file != null) {
      componentsList.add(file);
      file = file.getParent();
    }
    int size = componentsList.size();
    VirtualFile[] components = new VirtualFile[size];
    for (int i = 0; i < size; i++) {
      components[i] = componentsList.get(size - i - 1);
    }
    return components;
  }
static VirtualFile @NotNull [] getPathComponents(@NotNull VirtualFile file)