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

View source: R/textFileContents.R

textFileContentsR Documentation

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

Description

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

Usage

textFileContents(f)

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


MotusWTS/motusServer documentation built on Aug. 8, 2024, 10:23 p.m.