Skip to contents

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

Usage

create_directory_cnt(connector_object, name, ...)

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

Arguments

connector_object

connector The connector object to use.

name

character The name of the directory to create

...

Additional arguments passed to the method for the individual connector.

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")