Create a new subdirectory in the staging directory to store files for an upload to the Gobbler registry. If the to-be-uploaded files are saved here, users can avoid an extra copying step in uploadDirectory.

allocateUploadDirectory(staging, create = TRUE)

Arguments

staging

String containing the path to the staging directory.

create

Logical scalar specifying whether to actually create the subdirectory.

Value

String containing a path to a newly created subdirectory within staging. This (or its subdirectories) are typically used as the directory argument in uploadDirectory.

If create=FALSE, a name will be chosen but the subdirectory itself will not yet be created.

Author

Aaron Lun

Examples

staging <- tempfile()
dir.create(staging)
allocateUploadDirectory(staging)
#> [1] "/tmp/RtmpQ3n0nC/file1d19044e5a/upload-root-1d11ccd6c12"