update_sp_drive() updates the display name or description of a document
library. Changing the display name changes the drive name but not the
library URL.
delete_sp_drive() deletes a document library and all of its files and
folders. It requires confirmation by default and can't delete the default
document library of a site (usually named "Documents").
Both functions get the library's list from the drive and use
update_sp_list() or delete_sp_list().
Usage
update_sp_drive(
drive_name = NULL,
drive_id = NULL,
drive_url = NULL,
drive = NULL,
display_name = NULL,
description = NULL,
...,
properties = FALSE,
site_url = NULL,
site = NULL,
call = caller_env()
)
delete_sp_drive(
drive_name = NULL,
drive_id = NULL,
drive_url = NULL,
drive = NULL,
confirm = TRUE,
...,
site_url = NULL,
site = NULL,
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.- drive
A
ms_driveobject. Ifdriveis supplied,drive_name,drive_id, anddrive_urlare ignored.- display_name
New display name for the library. Optional.
- description
New description for the library. Optional.
- ...
Additional parameters passed to
get_sp_drive()ifdriveisNULL.- properties
For
update_sp_drive(), ifTRUE, return the drive properties instead of thems_driveobject. Defaults toFALSE.- 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.- 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.- confirm
If
TRUE(default), confirm deletion of the library before proceeding.
Value
For update_sp_drive(), the updated ms_drive object or its
properties if properties = TRUE. For delete_sp_drive(), invisibly
returns NULL.