Synopsis Append a value to a file.
Function void appendToFile(loc file, value V...) throws PathNotFound(loc file), IO(str msg)
Usage import IO;
Description Append a textual representation of some values to an existing or a newly created 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.
Encoding
The existing file can be stored using any character set possible, if you know the character set, please use appendToFileEnc.
Else the same method of deciding the character set is used as in readFile.
Pitfalls - The same encoding pitfalls as the readFile function.