List all versions of a project asset. This will call the REST API if the caller is not on the same filesystem as the registry.
listVersions(project, asset, registry, url, forceRemote = FALSE)
String containing the project name.
String containing the asset name.
String containing a path to the registry.
String containing the URL to the Gobbler REST API. Only used for remote access.
Logical scalar indicating whether to force remote access via the API,
even if registry
is on the same filesystem as the caller.
Character vector of versions.
info <- startGobbler()
removeProject("test", info$staging, url=info$url) # start from a clean slate.
createProject("test", info$staging, url=info$url)
# Mocking up a few uploads.
src <- allocateUploadDirectory(info$staging)
for (v in c("v1", "v2")) {
uploadDirectory("test", "simple", v, src, staging=info$staging, url=info$url)
}
# Listing the versions of the asset:
listVersions("test", "simple", registry=info$registry, url=info$url)
#> [1] "v1" "v2"
# Force remote listing:
listVersions("test", "simple", registry=info$registry, url=info$url, forceRemote=TRUE)
#> [1] "v1" "v2"