zget_drive_id: zget_drive_id

zget_drive_idR Documentation

zget_drive_id

Description

Helper function used by update_fm() that attempts to resolve a Google Drive (for Web) path, given a string, and return the id for this path. If it's not found, it should return NULL.

Usage

zget_drive_id(
  drive_path,
  drive_root = NULL,
  exact_match = TRUE,
  fm_key = NULL,
  missing_val = NA
)

Arguments

drive_path

passed to drive_find_path(); default=NULL

exact_match

passed to drive_find_path(); default=TRUE

fm_key

name of the front-matter key you're trying to fill; used in error messaging and naming output

missing_val

what to return if key not matched. default=NA

Details

Primary usage is to populate 'Gdrive*ID' keys in the front-matter.yml. These are used to go between the virtualized "local" paths of the Google Drive for Desktop and the web paths used in the Web-based Google Drive API needed to create Google Drive files.

Value

an ID as a single character value, named with fm_key parameter


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.