Lists site/subsite/drive/folder contents. Can be used with default site/drive set by
sp_defaults()
or with a specified site/drive.
sp_list()
lists the contents of a Sharepoint Drive or a folder.
sp_list_drives()
lists the drives contained in a Sharepoint site.
sp_list_subsites()
lists any subsites of the specified Sharepoint site.
sp_list_sites()
lists the sites you have access to. These are the sites you are following in Sharepoint
sp_list(
folder = "",
site = NULL,
drive = NULL,
pattern = NULL,
full_names = FALSE,
recursive = FALSE,
include_dirs = FALSE
)sp_list_drives(site = NULL, pattern = NULL)
sp_list_sites(pattern = NULL)
sp_list_subsites(site = NULL, pattern = NULL)
A tibble with name and additional information on the relevant sites/drives/files
Path to the folder. By default, lists the top-level contents of the drive.
Site identifier. Can be the site name, id, URL, or an ms_site object. If no site identifier is provided, uses the stored default site if it exists.
Drive identifier. Can be the drive name, id, or an ms_drive object. If site is provided but drive is not, uses the first drive of the provided site. If neither is provided, uses the stored default drive if it exists.
Optional regular expression. Only names which match the regular expression will be returned.
logical. If TRUE, the directory path is prepended to the file names to give a relative file path. If FALSE, the file names (rather than paths) are returned.
logical. Should the listing recurse into directories? If TRUE, full_names is also set to TRUE.
logical. Should subdirectory names be included in recursive listings? (They always are in non-recursive ones)
if (FALSE) { # interactive()
# List drives from the default site
sp_list_drives()
# List drives from a specific site
sp_list_drives("Data Analytics")
}
Run the code above in your browser using DataLab