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)

Arguments

project

String containing the project 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 asset names.

Author

Aaron Lun

Examples

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"