spdir: Files and Folders

Description Usage Arguments Value See Also Examples

View source: R/files_and_folders.R

Description

List the files and folders in a SharePoint directory.

Usage

1
2
3
4
5
spfolders(directory = "", site, site_collection, full = FALSE)

spfiles(directory = "", site, site_collection, full = FALSE)

spdir(directory = "", site, site_collection, recursive = FALSE, full = FALSE)

Arguments

directory

a directory name.

site

a SharePoint site name, e.g. '/ExpertGroups/WGNSSK'.

site_collection

a SharePoint site collection, will almost exclusively be 'https://community.ices.dk', so these functions should work for other SharePoint sites outside ICES.

full

a logical value. 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.

recursive

logical. Should the listing recurse into directories?

Value

A character vector containing the names of the files in the specified directories, or "" if there were no files. If a path does not exist or is not a directory or is unreadable it is skipped, with a warning..

See Also

setspwd, getspwd set and get SharePoint working directory.

setspsite, getspsite set and get SharePoint default site.

Examples

1
2
3
4
5
6
7
8
## Not run: 
spfolders()
spfiles()
spdir()

spdir(site = "/ExpertGroups/WGNSSK")

## End(Not run)

ices-tools-prod/icesSharePoint documentation built on June 27, 2021, 5:16 p.m.