R/file.R
as_file.Rd
Mark as a file by adding classes
as_file(path)
file path
path with classes set to "file" and "file_{ext}" where ext is the file extension
path
"file"
"file_{ext}"
ext
tf <- tempfile(fileext = ".txt") writeLines("", tf) as_file(tf) #> File /tmp/RtmpXCeuoO/file24c116632101.txt