Learn R Programming

AzureStor (version 1.0.0)

list_blobs: Operations on a blob container

Description

Upload, download, or delete a blob; list blobs in a container.

Usage

list_blobs(container, info = c("partial", "name", "all"),
  prefix = NULL)

upload_blob(container, src, dest, type = "BlockBlob", blocksize = 2^24, lease = NULL)

download_blob(container, src, dest, overwrite = FALSE, lease = NULL)

delete_blob(container, blob, confirm = TRUE)

Arguments

container

A blob container object.

info

For list_blobs, level of detail about each blob to return: a vector of names only; the name, size and last-modified date (default); or all information.

prefix

For list_blobs, filters the result to return only blobs whose name begins with this prefix.

src, dest

The source and destination filenames for uploading and downloading. Paths are allowed.

type

When uploading, the type of blob to create. Currently only block blobs are supported.

blocksize

The number of bytes to upload per HTTP(S) request.

lease

The lease for a blob, if present.

overwrite

When downloading, whether to overwrite an existing destination file.

blob

A string naming a blob.

confirm

Whether to ask for confirmation on deleting a blob.

Value

For list_blobs, details on the blobs in the container.

See Also

blob_container, az_storage

Examples

Run this code
# NOT RUN {
cont <- blob_container("https://mystorage.blob.core.windows.net/mycontainer", key="access_key")

list_blobs(cont)

upload_blob(cont, "~/bigfile.zip", dest="bigfile.zip")
download_blob(cont, "bigfile.zip", dest="~/bigfile_downloaded.zip")

delete_blob(cont, "bigfile.zip")

# }

Run the code above in your browser using DataLab