Navigation
Synopsis Write values to a file.
Function void writeFile(loc file, value V...) throws PathNotFound(loc file), IO(str msg)
Usage import IO;
Description Write a textual representation of some values to a file:
  • If a value is a simple string, the quotes are removed and the contents are de-escaped.
  • If a value has a non-terminal type, the parse tree is unparsed to produce a value.
  • All other values are printed as-is.
  • Each value is terminated by a newline character.

    Files are encoded in UTF-8, in case this is not desired, use writeFileEnc.
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.