textFileContents: return the contents of a text file as a character scalar, or...

Description Usage Arguments Value Note Author(s)

Description

return the contents of a text file as a character scalar, or the empty string if the file doesn't exist.

Usage

1

Arguments

f

full path to the file

Value

character scalar with the file contents, or empty if the file is empty or doesn't exist.

Note

mainly for reading a file which is not known to exist, e.g. a file whose name is passed as a parameter to a sub-shell, but where there's no guarantee the subshell actually wrote to it.

Contents only up to the first embedded NUL are returned.

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm


jbrzusto/motus-R-package documentation built on May 18, 2019, 7:03 p.m.