| drs_stat {AnVIL} | R Documentation |
drs_stat() resolves zero or more DRS URLs to their
google bucket location.
drs_cp() copies 0 or more DRS URIs to a google
bucket or local folder
drs_stat(source = character()) drs_cp(source, destination, ...)
source |
character() DRS URLs (beginning with 'drs://') to resources managed by the 'martha' DRS resolution server. |
destination |
character(1) directory path in which to retrieve files. |
... |
additional arguments, passed to |
drs_stat() sends requests in parallel to the DRS server,
using 8 forked processes (by default) to speed up queries. Use
options(mc.cores = 16L), for instance, to set the number of
processes to use.
`drs_stat()` uses the AnVIL 'pet' account associated with a runtime. The pet account is discovered by default when evaluated on an AnVIL runtime (e.g., in RStudio or a Jupyter notebook in the AnVIL), or can be found in the return value of `avruntimes()`.
drs_stat() returns a tbl with the following columns:
fileName: character() (resolver sometimes returns null).
size: integer() (resolver sometimes returns null).
contentType: character() (resolver sometimes returns null).
gsUri: character() (resolver sometimes returns null).
timeCreated: character() (the time created formatted using ISO 8601; resolver sometimes returns null).
timeUpdated: character() (the time updated formatted using ISO 8601; resolver sometimes returns null).
bucket: character() (resolver sometimes returns null).
name: character() (resolver sometimes returns null).
googleServiceAccount: list() (null unless the DOS url belongs to a Bond supported host).
hashes: list() (contains the hashes type and their checksum value; if unknown. it returns null)
drs_cp() returns a tibble like drs_stat(), but with
additional columns
simple: logical() value indicating whether resolution used a
simple signed URL (TRUE) or auxilliary service account.
destination: character() full path to retrieved object(s)
drs_eg_anvil <- c(
"drs://dg.ANV0/975bd45f-f022-4fad-b9a2-3a00c3b8792c",
"drs://dg.ANV0/00008531-03d7-418c-b3d3-b7b22b5381a0"
)
if (gcloud_exists() && startsWith(gcloud_account(), "pet-")) {
## from within AnVIL
drs_stat(drs_eg_anvil)
}