public static @NotNull List<VirtualFile> markDirty(boolean recursive, boolean reloadChildren, VirtualFile @NotNull ... files) {
    var result = new ArrayList<VirtualFile>(files.length);

    for (var file : files) {
      if (file == null) continue;
      if (reloadChildren && file.isValid()) {
        file.getChildren();
      }
      if (file instanceof NewVirtualFile nvf) {
        if (recursive) {
          nvf.markDirtyRecursively();
        }
        else {
          nvf.markDirty();
        }
        result.add(file);
      }
    }

    return result;
  }
public static @NotNull List<VirtualFile> markDirty(boolean recursive, boolean reloadChildren, VirtualFile @NotNull ... files)