source_file: Create a Source File Indicator

Description Usage Arguments Details Value Examples

View source: R/source_file.R

Description

This object is basically just a file path, except it additionally has an attribute for the file origin. This is used to then be able to infer a connection object based on the source_file object created.

Usage

1
source_file(path, origin = "local")

Arguments

path

File path respective to the specified origin

origin

Origin of the file - either onedrive, sharepoint, or local

Details

Since file connections are eliminated and garbage collected once they're closed, they're unreliable as persistent objects in your R session. To get around this, m365filer creates the file connections on demand. To preserve the automation of this, this object is created, which feeds into get_file_connection() to return a connection object, which is then used to interface with OneDrive or SharePoint as necessary

Value

source_file object

Examples

1
2
3
source_file('some/file/path.txt', 'local')
source_file('some/file/path.txt', 'onedrive')
source_file('some/file/path.txt', 'sharepoint')

atorus-research/m365filer documentation built on Jan. 20, 2022, 12:04 a.m.