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)

Arguments

project

String containing the project name.

asset

String containing the asset name.

registry

String containing a path to the registry.

url

String containing the URL to the Gobbler REST API. Only used for remote access.

forceRemote

Logical scalar indicating whether to force remote access via the API, even if registry is on the same filesystem as the caller.

Value

Character vector of versions.

Author

Aaron Lun

Examples

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"