public static void saveText(@NotNull VirtualFile file, @NotNull String text) throws IOException {
    Charset charset = file.getCharset();
    try (OutputStream stream = file.getOutputStream(file)) {
      stream.write(text.getBytes(charset));
    }
  }
public static void saveText(@NotNull VirtualFile file, @NotNull String text)