This function makes it convenient to upload a large number of files to an OSF project, particularly when there are many levels of nested sub-folders. It relies on the osfr package.
An osf_tbl representation created with osfr::osf_retrieve_node()
A file path to a first-level directory in your local project folder. e.g., "data". Do not specifiy second-level directories e.g., "data/raw".
To upload files from the root project folder, specify dir = "." or leave out argument.
An array of file/folder names and pattern strings to not include in the upload to OSF. e.g., you might have a folder of "old" scripts or data files that you do not want uploaded.
This determines what happens when a file with the same name exists at the specified destination. Can be one of the following: - "error" (the default): throw an error and abort the file transfer operation. - "skip": skip the conflicting file(s) and continue transferring the remaining files. - "overwrite": replace the existing file with the transferred copy.