get_sp_drive() wraps the get_drive method returns a ms_drive object.
cache_sp_drive() allows you to cache a default SharePoint drive for use by
other functions. Additional parameters in ... are passed to
get_sp_drive().
Usage
get_sp_drive(
  drive_name = NULL,
  drive_id = NULL,
  drive_url = NULL,
  properties = FALSE,
  ...,
  site_url = NULL,
  site = NULL,
  default_drive_name = getOption("sharepointr.default_drive_name", "Documents"),
  cache = getOption("sharepointr.cache", FALSE),
  refresh = getOption("sharepointr.refresh", TRUE),
  overwrite = FALSE,
  cache_file = NULL,
  call = caller_env()
)
cache_sp_drive(
  ...,
  drive = NULL,
  cache_file = getOption("sharepointr.cache_file_drive", "sp_drive.rds"),
  overwrite = FALSE,
  call = caller_env()
)Arguments
- drive_name, drive_id
 SharePoint Drive name or ID passed to
get_drivemethod for SharePoint site object.- drive_url
 A SharePoint Drive URL to parse for a Drive name and other information. If
drive_nameis a URL, it is used asdrive_url.- properties
 If
TRUE, return the drive properties instead of thems_driveobject. Defaults toFALSE.- ...
 Arguments passed on to
get_sp_sitesite_name,site_idSite name or ID of the SharePoint site as an alternative to the SharePoint site URL. Exactly one of
site_url,site_name, andsite_idmust be supplied.
- site_url
 A SharePoint site URL in the format "https://[tenant name].sharepoint.com/sites/[site name]". Any SharePoint item or document URL can also be parsed to build a site URL using the tenant and site name included in the URL.
- site
 A
ms_siteobject. Ifsiteis supplied,site_url,site_name, andsite_idare ignored.- default_drive_name
 Drive name string used only if input is a document URL and drive name is not part of the URL. Defaults to
getOption("sharepointr.default_drive_name", "Documents")- cache
 If
TRUE, cache drive to a file usingcache_sp_drive().- refresh
 If
TRUE, get a new drive even if the existing drive is cached as a local option. IfFALSE, use the cachedms_driveobject if it exists.- overwrite
 If
TRUE, replace the existing cached object named bycache_filewith the new object. IfFALSE, error if a cached file with the samecache_filename already exists.- cache_file
 File name for cached drive or site. Default
NULL.- call
 The execution environment of a currently running function, e.g.
caller_env(). The function will be mentioned in error messages as the source of the error. See thecallargument ofabort()for more information.- drive
 A
ms_driveobject. Ifdriveis supplied,drive_nameanddrive_idare ignored.