Skip to contents

Generic implementing of how to remove a directory for a connector. Mostly relevant for file storage connectors.

  • connector_fs: Uses unlink() with recursive = TRUE to remove a directory at the path of the connector.

Usage

remove_directory_cnt(connector_object, name, ...)

# S3 method for class 'connector_fs'
remove_directory_cnt(connector_object, name, ...)

Arguments

connector_object

connector The connector object to use.

name

character The name of the directory to remove

...

Additional arguments passed to the method for the individual connector.

Value

invisible connector_object.

Examples

# Remove a directory from a file storage

cnt <- connector_fs$new(tempdir())

cnt |>
  create_directory_cnt("new_folder")

cnt |>
  list_content_cnt(pattern = "new_folder")
#> [1] "new_folder"

cnt |>
  remove_directory_cnt("new_folder") |>
  list_content_cnt(pattern = "new_folder")
#> character(0)