Create a new subdirectory in the staging directory to store files for an upload via uploadDirectory.

allocateUploadDirectory(staging, attempts = 3)

Arguments

staging

String containing the path to the staging directory.

attempts

Integer scalar specifying the number of attempts to allocate a new directory, after which an error is thrown.

Value

String containing a path to a newly created subdirectory within staging.

Author

Aaron Lun

Examples

staging <- tempfile()
dir.create(staging)
allocateUploadDirectory(staging)
#> [1] "/tmp/RtmpcPC1yF/file22c79a5f3e1/upload-22c1d743280"