List all assets in a project. This will call the REST API if the caller is not on the same filesystem as the registry.
listAssets(project, registry, url, forceRemote = FALSE)
String containing the project 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 asset names.
info <- startGobbler()
removeProject("test", info$staging, url=info$url) # start with a clean slate.
createProject("test", info$staging, url=info$url)
# Mocking up a few uploads.
src <- allocateUploadDirectory(info$staging)
for (ass in c("simple", "more-simple", "even-more-simple")) {
uploadDirectory("test", ass, "v1", src, staging=info$staging, url=info$url)
}
# Listing available assets:
listAssets("test", registry=info$registry, url=info$url)
#> [1] "even-more-simple" "more-simple" "simple"
# Force remote listing:
listAssets("test", registry=info$registry, url=info$url, forceRemote=TRUE)
#> [1] "even-more-simple" "more-simple" "simple"