Upload a directory as a new versioned asset of a project in the registry.
uploadDirectory(
project,
asset,
version,
directory,
staging,
url,
probation = FALSE
)
String containing an existing project name.
String containing a new or existing asset name in project
.
String containing the name of a new version of asset
.
String containing the path to a directory to be uploaded.
This should be inside staging
for best performance, see allocateUploadDirectory
for details.
String containing the path to the staging directory.
String containing the URL of the gobbler REST API.
Logical scalar indicating whether to upload a probational version.
On success, NULL
is invisibly returned.
createProject
, to create a new project for uploads.
versionPath
, to obtain the path to a versioned asset's contents inside the registry.
fetchManifest
, to obtain the manifest of the versioned asset's contents.
info <- startGobbler()
removeProject("test", info$staging, url=info$url) # start with a clean slate.
createProject("test", info$staging, url=info$url)
src <- allocateUploadDirectory(info$staging)
write(file=file.path(src, "foo"), "BAR")
uploadDirectory(
project="test",
asset="simple",
version="v1",
directory=src,
staging=info$staging,
url=info$url
)