Skip to contents

Lists the files in a project's Workspace vector store and left-joins the project's Google Drive folder onto them by (normalized) filename. Each store file is paired with its Drive link and last-modified time where a same-named file exists in the project folder; files not sourced from Drive (e.g. emails or meeting notes) come back with NA in the Drive columns.

Usage

workspace_ls(newest_first = TRUE, project = dl_get_project())

Arguments

newest_first

Logical. If TRUE (default), order files from most- to least-recently added to the store (created_at). If FALSE, keep the store's order.

project

Character scalar. Project ID to load from the datalake. Defaults to dl_get_project().

Value

A tibble with one row per store file and columns:

  • filename — store file name.

  • synced — logical; is the store copy at least as new as the Drive source? NA when there is no matching Drive file.

  • last_modified — Drive source's last-modified time (POSIXct); NA if not in Drive.

  • created_at — when the file was added to the vector store (POSIXct).

  • link — clickable Drive path (a gdrive_path); NA if not in Drive.

  • file_id — vector-store file ID.

  • drive_id — Google Drive file ID; NA if not in Drive.

  • bytes — store file size in bytes.

  • status — store file processing status.

Details

The vector store is taken from the project's vector_store_id. Drive information (clickable link, path, last-modified) is pulled from gdrive_ls().

A synced flag compares the store file's created_at against the Drive file's last_modified: TRUE when the store copy is at least as new as the Drive source, FALSE when the Drive source has changed since (store is stale), and NA when there is no matching Drive file.

Examples

if (FALSE) { # \dontrun{
workspace_ls()
workspace_ls(project = "sentinel")
} # }