osf_upload_or_update: Upload/Update A File On OSF

Usage Arguments Value Examples

View source: R/osf-upload-or-update.R

Usage

1
2
osf_upload_or_update(has_osf_access = FALSE, project_id = NULL,
  file_id = NULL, path = NULL, osf_dirpath = NULL, name = NULL)

Arguments

has_osf_access

Logical, Whether the user has access to the project's OSF repository.

project_id

Character, The id of the OSF project.

file_id

Character, The id of the existing OSF file (if any).

path

Character, The file path.

osf_dirpath

Character, The directory path where the file will be located in the OSF project (e.g., "data/raw-data")

name

Character, The name of the destination file on OSF (if NULL, basename(path) will be used).

Value

A timestamp of when the file was created/modified.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
  osf_upload_or_update(has_osf_access = TRUE,
                   project_id = "u4kb7",
                   path = "iris.csv",
                   osf_dirpath = "data/processed-data")

   osf_upload_or_update(has_osf_access = TRUE,
                   project_id = "u4kb7",
                   path = "iris.csv",
                   file_id = "XXXXX",  # <- replace this with the file id
                   osf_dirpath = "data/processed-data")


## End(Not run)

tiernanmartin/drakepkg documentation built on March 11, 2020, 3:11 a.m.