Upload a directory as a new versioned asset of a project in the Gobbler registry.
uploadDirectory(
project,
asset,
version,
directory,
staging,
url,
probation = FALSE,
consume = NULL,
ignore.. = TRUE
)
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, typically using the directory allocated by allocateUploadDirectory
.
Otherwise, the contents of directory
will be copied to staging
prior to upload.
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.
Logical scalar indicating whether the contents of directory
can be consumed by the upload process.
If TRUE
, the Gobbler will attempt to move files from directory
into the registry.
Otherwise, the contents of directory
will not be modified by the upload.
Defaults to TRUE
if the contents of directory
need to be copied to staging
.
Logical scalar indicating whether to skip dotfiles in directory
during upload.
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
)