text_read() and text_write() respectively wrap base::readLines() and
base::writeLines(). They further validate their arguments, normalize
file paths and re-encode inputs to UTF-8 before reading and writing.
text_read(path = "", encoding = "UTF-8")text_write(x = character(), path = "", encoding = "UTF-8")
text_read() returns a character vector.
text_write() returns NULL, invisibly.
A non-empty and non-NA character string. A path to a file to read text from, or write text to.
A non-empty and non-NA character string. The source character encoding. In almost all cases, this should be UTF-8. Other encodings are internally re-encoded to UTF-8 for portability.
A character vector. Lines of text to write. Its current encoding is
given by encoding.