cloud_object_ls {cloudfs} | R Documentation |
Prepare a dataframe for bulk writing of objects to cloud
Description
cloud_*_ls
functions for cloud locations (e.g.
cloud_s3_ls
) return content dataframes which can then be passed to
cloud_*_read_bulk
and cloud_*_download_bulk
functions to read/download
multiple files at once. In a similar manner, this function accepts a list
of objects as an input and produces a dataframe which can then be passed to
cloud_*_write_bulk
functions to write multiple files at once.
Usage
cloud_object_ls(x, path, extension, prefix = "", suffix = "")
Arguments
x |
A named list. Names may contain letters, digits, spaces, '.', '-', '_' symbols and cannot contain trailing or leading spaces. |
path |
A directory relative to the project root to write objects to. |
extension |
File extension (string) without the leading dot. |
prefix , suffix |
(optional) strings to attach at the beginning or at the end of file names. |
Value
A tibble in which each row represents an object from the input list, comprising the following columns:
-
object
- objects you've provided -
name
- contains paths where objects are meant to be written.
Examples
cloud_object_ls(
dplyr::lst(mtcars = mtcars, iris = iris),
path = "data",
extension = "csv",
prefix = "df_"
)