create_directory_cnt | R Documentation |
Generic implementing of how to create a directory for a connector. Mostly relevant for file storage connectors.
ConnectorFS: Uses fs::dir_create()
to create a directory at the path of the connector.
create_directory_cnt(connector_object, name, open = TRUE, ...)
## S3 method for class 'ConnectorFS'
create_directory_cnt(connector_object, name, open = TRUE, ...)
connector_object |
Connector The connector object to use. |
name |
character The name of the directory to create |
open |
logical Open the directory as a new connector object. |
... |
Additional arguments passed to the method for the individual connector. |
invisible connector_object.
# Create a directory in a file storage
folder <- withr::local_tempdir()
cnt <- connector_fs(folder)
cnt |>
list_content_cnt(pattern = "new_folder")
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.