Create a custom file connection
Arguments
- description
path to a filename; contrary to
rconnection
a connection object is not supported.- mode
character string. A description of how to open the connection if it is to be opened upon creation e.g. "rb". Default "" (empty string) means to not open the connection on creation - user must still call
open()
. Note: If an "open" string is provided, the user must still callclose()
otherwise the contents of the file aren't completely flushed until the connection is garbage collected.- verbosity
integer value 0, 1, or 2. Default: 0. Set to
0
for no debugging messages,1
for some high-level messages andverbosity = 2
for all debugging messages.
Details
This vfs_file()
connection works like the file()
connection
in R itself.
This connection works with both ASCII and binary data, e.g. using
readLines()
and readBin()
.