| ConnectorSharepoint | R Documentation |
This object is used to interact with Sharepoint, adding the ability to list, read, write, download, upload, create directories and remove files.
About the token, you can retrieve it by following the guideline in your enterprise.
connector::Connector -> connector::ConnectorFS -> ConnectorSharepoint
foldercharacter The path of the folder to interact with
tokencharacter The Azure token
site_urlcharacter The URL of the Sharepoint site
pathcharacter The whole URL path of the Sharepoint resource
connector::Connector$list_content_cnt()connector::Connector$print()connector::Connector$read_cnt()connector::Connector$remove_cnt()connector::Connector$write_cnt()connector::ConnectorFS$create_directory_cnt()connector::ConnectorFS$download_cnt()connector::ConnectorFS$download_directory_cnt()connector::ConnectorFS$remove_directory_cnt()connector::ConnectorFS$tbl_cnt()connector::ConnectorFS$upload_cnt()connector::ConnectorFS$upload_directory_cnt()new()Initializes the ConnectorSharepoint class
ConnectorSharepoint$new( site_url, token = get_token(), folder = "", extra_class = NULL, ... )
site_urlcharacter The URL of the Sharepoint site
tokencharacter The Azure token. By default, it will be retrieve by get_token
foldercharacter The path of the folder to interact with, if you don't want to interact with the root folder "Documents"
extra_classcharacter Extra class added to the object.
...Additional parameters to pass to the
get_sharepoint_site function
A ConnectorSharepoint object
get_conn()Get the connection
ConnectorSharepoint$get_conn()
The connection
## Not run:
# Connect to Sharepoint
cs <- ConnectorSharepoint$new(
site_url = Sys.getenv("SHAREPOINT_SITE_URL")
)
cs
# List content
cs$list_content_cnt()
# Write to the connector
cs$write_cnt(iris, "iris.rds")
# Check it is there
cs$list_content_cnt()
# Read the result back
cs$read_cnt("iris.rds") |>
head()
# Remove a file or directory
cs$remove_cnt("iris.rds")
# Check it is there
cs$list_content_cnt()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.