docs: public static void write(File file, String text, boolean append) throws IOException {
          FileWriter writer = new FileWriter(file, append);
          try {
              writer.write(text);
          } finally {
              writer.close();
          }
      }