Learn R Programming

osfr (version 0.1.1)

upload_zip: Zip up a directory and upload the zip to OSF (both new and revised)

Description

Zip up a directory and upload the zip to OSF (both new and revised)

Usage

upload_zip(id, path, dest = NULL)

Arguments

id

OSF id (osf.io/XXXXX) to upload to. Specify a project id to upload a new zip file. Specify a file id to upload a revised zip file.

path

Path to directory on local machine to zip up and upload.

dest

Name of the destination file on OSF (if NULL, basename(path) with a '.zip' suffix will be used). Note that this can be used to specify what folder to place files in, e.g. 'my_folder/my_directory.zip'. Also note that if id is a file ID, this is not necessary.

Value

Boolean of upload success

Examples

Run this code
# NOT RUN {
upload_zip(id = "12345", path = "my_dir")
upload_zip(id = "12345", path = "my_dir", dest = "my_folder/my_directory.zip")
# }

Run the code above in your browser using DataLab