Generic implementing of how to upload files to a connector:
connector_fs: Uses
file.copy()
to copy thefile
to the file storage.
Value
invisible connector_object.
Examples
# Upload file to a file storage
writeLines("this is an example", "example.txt")
cnt <- connector_fs$new(tempdir())
cnt |>
list_content_cnt(pattern = "example.txt")
#> character(0)
cnt |>
upload_cnt("example.txt")
cnt |>
list_content_cnt(pattern = "example.txt")
#> [1] "example.txt"
cnt |>
remove_cnt("example.txt")
file.remove("example.txt")
#> [1] TRUE