# Remove table in a DBI database
cnt <- connector_dbi(RSQLite::SQLite())
cnt |>
write_cnt(iris, "iris") |>
list_content_cnt()
cnt |>
remove_cnt("iris") |>
list_content_cnt()
# Remove a file from the file storage
folder <- withr::local_tempdir("test", .local_envir = .GlobalEnv)
cnt <- connector_fs(folder)
cnt |>
write_cnt("this is an example", "example.txt")
cnt |>
list_content_cnt(pattern = "example.txt")
cnt |>
read_cnt("example.txt")
cnt |>
remove_cnt("example.txt")
cnt |>
list_content_cnt(pattern = "example.txt")
# Add logging to a connector and remove content
folder <- withr::local_tempdir("test", .local_envir = .GlobalEnv)
cnt <- connectors(data = connector_fs(folder)) |> add_logs()
cnt$data |>
write_cnt(iris, "iris.csv")
cnt$data |>
remove_cnt("iris.csv")
Run the code above in your browser using DataLab