Learn R Programming

connector (version 0.1.0)

list_content_cnt: List available content from the connector

Description

Generic implementing of how to list all content available for different connectors:

  • ConnectorFS: Uses list.files() to list all files at the path of the connector.

Usage

list_content_cnt(connector_object, ...)

# S3 method for ConnectorDBI list_content_cnt(connector_object, ...)

# S3 method for ConnectorFS list_content_cnt(connector_object, ...)

Value

A character vector of content names

Arguments

connector_object

Connector The connector object to use.

...

Additional arguments passed to the method for the individual connector.

Examples

Run this code
# 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$")

Run the code above in your browser using DataLab