Generic implementing of how to download files from a connector:
connector_fs: Uses
file.copy()
to copy a file from the file storage to the desiredfile
.
Value
invisible file.
Examples
# Download file from a file storage
cnt <- connector_fs$new(tempdir())
cnt |>
write_cnt("this is an example", "example.txt")
list.files(pattern = "example.txt")
#> character(0)
cnt |>
download_cnt("example.txt")
list.files(pattern = "example.txt")
#> [1] "example.txt"
readLines("example.txt")
#> [1] "this is an example"
cnt |>
remove_cnt("example.txt")