Generic implementing of how to create a directory for a connector. Mostly relevant for file storage connectors.
connector_fs: Uses
dir.create()
to create a directory at the path of the connector.
Usage
create_directory_cnt(connector_object, name, ...)
# S3 method for class 'connector_fs'
create_directory_cnt(connector_object, name, ...)
Value
invisible connector_object.
Examples
# Create a directory in a file storage
cnt <- connector_fs$new(tempdir())
cnt |>
list_content_cnt(pattern = "new_folder")
#> character(0)
cnt |>
create_directory_cnt("new_folder")
# This will return new connector object of a newly created folder
new_connector <- cnt |>
list_content_cnt(pattern = "new_folder")
cnt |>
remove_directory_cnt("new_folder")