as.character.file: Convert file connections to strings

Description Usage Arguments Value See Also Examples

Description

as.character method for file connections.

Usage

1
2
## S3 method for class 'file'
as.character(x, ...)

Arguments

x

A file connection.

...

Not currently used.

Value

A string containing the target location of the file connection.

See Also

file, summary.connection, as.character

Examples

1
2
3
4
rprofile <- file.path(R.home("etc"), "Rprofile.site")
fcon <- file(rprofile)
assertive.base::assert_all_are_true(identical(as.character(fcon), rprofile))
close(fcon)

assertive.files documentation built on May 2, 2019, 1:29 p.m.