ConnectorSharepoint: Connector Object for Sharepoint class, built on top of...

ConnectorSharepointR Documentation

Connector Object for Sharepoint class, built on top of connector::Connector class

Description

This object is used to interact with Sharepoint, adding the ability to list, read, write, download, upload, create directories and remove files.

Details

About the token, you can retrieve it by following the guideline in your enterprise.

Super classes

connector::Connector -> connector::ConnectorFS -> ConnectorSharepoint

Active bindings

folder

character The path of the folder to interact with

token

character The Azure token

site_url

character The URL of the Sharepoint site

path

character The whole URL path of the Sharepoint resource

Methods

Public methods

Inherited methods

Method new()

Initializes the ConnectorSharepoint class

Usage
ConnectorSharepoint$new(
  site_url,
  token = get_token(),
  folder = "",
  extra_class = NULL,
  ...
)
Arguments
site_url

character The URL of the Sharepoint site

token

character The Azure token. By default, it will be retrieve by get_token

folder

character The path of the folder to interact with, if you don't want to interact with the root folder "Documents"

extra_class

character Extra class added to the object.

...

Additional parameters to pass to the get_sharepoint_site function

Returns

A ConnectorSharepoint object


Method get_conn()

Get the connection

Usage
ConnectorSharepoint$get_conn()
Returns

The connection

Examples

## 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)

connector.sharepoint documentation built on June 1, 2026, 9:07 a.m.