call_azcopy | R Documentation |
Call the azcopy file transfer utility
call_azcopy(..., env = NULL, silent = getOption("azure_storage_azcopy_silent", FALSE))
... |
Arguments to pass to AzCopy on the commandline. If no arguments are supplied, a help screen is printed. |
env |
A named character vector of environment variables to set for AzCopy. |
silent |
Whether to print the output from AzCopy to the screen; also sets whether an error return code from AzCopy will be propagated to an R error. Defaults to the value of the |
AzureStor has the ability to use the Microsoft AzCopy commandline utility to transfer files. To enable this, ensure the processx package is installed and set the argument use_azcopy=TRUE
in any call to an upload or download function; AzureStor will then call AzCopy to perform the file transfer rather than relying on its own code. You can also call AzCopy directly with the call_azcopy
function.
AzureStor requires version 10 or later of AzCopy. The first time you try to run it, AzureStor will check that the version of AzCopy is correct, and throw an error if it is version 8 or earlier.
The AzCopy utility must be in your path for AzureStor to find it. Note that unlike earlier versions, Azcopy 10 is a single, self-contained binary file that can be placed in any directory.
A list, invisibly, with the following components:
status
: The exit status of the AzCopy command. If this is NA, then the process was killed and had no exit status.
stdout
: The standard output of the command.
stderr
: The standard error of the command.
timeout
: Whether AzCopy was killed because of a timeout.
processx::run, download_blob, download_azure_file, download_adls_file
## Not run: endp <- storage_endpoint("https://mystorage.blob.core.windows.net", sas="mysas") cont <- storage_container(endp, "mycontainer") # print various help screens call_azcopy("help") call_azcopy("help", "copy") # calling azcopy to download a blob storage_download(cont, "myblob.csv", use_azcopy=TRUE) # calling azcopy directly (must specify the SAS explicitly in the source URL) call_azcopy("copy", "https://mystorage.blob.core.windows.net/mycontainer/myblob.csv?mysas", "myblob.csv") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.