list_content_cnt {connector} | R Documentation |
List available content from the connector
Description
Generic implementing of how to list all content available for different connectors:
-
ConnectorDBI: Uses
DBI::dbListTables()
to list the tables in a DBI connection.
-
ConnectorFS: Uses
list.files()
to list all files at the path of the connector.
Usage
list_content_cnt(connector_object, ...)
## S3 method for class 'ConnectorDBI'
list_content_cnt(connector_object, ...)
## S3 method for class 'ConnectorFS'
list_content_cnt(connector_object, ...)
Arguments
connector_object |
Connector The connector object to use. |
... |
Additional arguments passed to the method for the individual connector. |
Value
A character vector of content names
Examples
# List tables in a DBI database
cnt <- connector_dbi(RSQLite::SQLite())
cnt |>
list_content_cnt()
# List content in a file storage
cnt <- connector_fs(tempdir())
cnt |>
list_content_cnt()
# Only list CSV files using the pattern argument of list.files
cnt |>
list_content_cnt(pattern = "\\.csv$")
[Package connector version 0.1.1 Index]