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/Rtmpk5zsYr/file2197a3c9b70/upload-21953b68a8a"