guava/src/com/google/common/io/Files.java
public static CharSink asCharSink(File file, Charset charset, FileWriteMode... modes) {
    return asByteSink(file, modes).asCharSink(charset);
  }
public static CharSink asCharSink(File file, Charset charset, FileWriteMode... modes) {
    return asByteSink(file, modes).asCharSink(charset);
  }
Returns a new {@link CharSink} for writing character data to the given file using the given
character set. The given {@code modes} control how the file is opened for writing. When no mode
is provided, the file will be truncated before writing. When the {@link FileWriteMode#APPEND
APPEND} mode is provided, writes will append to the end of the file without truncating it.

@since 14.0