b2DownloadFileByName: Download B2 File by Name.

Description Usage Arguments Details Value Examples

View source: R/b2DownloadFileByName.R

Description

b2DownloadFileByName downloads a file from the user's account on the Backblaze B2 cloud storage product.

Usage

1
b2DownloadFileByName(bucketName, fileName, overwrite = FALSE)

Arguments

bucketName

The name of the bucket containing the requested file. Bucket names may be obtained through the b2ListBuckets function in this package.

fileName

The name of the file to be downloaded. File names may be obtained through the b2ListFileNames function in this package.

overwrite

Binary TRUE or FALSE decision to overwrite any files in the current working directory, whose names match the downloaded file name.

Details

This function downloads a file from the user's account on the Backblaze B2 cloud storage product using the file's name only. Files of the same name may have multiple versions stored on B2. Therefore, only the most recent version matching the specified filename will be downloaded. Further details regarding this API call are available here:

https://www.backblaze.com/b2/docs/b2_download_file_by_name.html

fileName and bucketName are mandatory and must be user defined. overwrite is optionally user defined and defaults to FALSE.

Value

If successful the response headers include the Content-Type that was specified when the file was uploaded. They also include the X-Bz-FileName and X-Bz-Content-Sha1 headers. The X-Bz-FileName uses percent-encoding, as if it were a URL parameter. If successful, the file will be downloaded to the current working directory.

Examples

1
2
3
4
5
## Not run: 
b2DownloadFileByName(bucketName = "this-is-a-uniquely-named-bucket",
fileName = "yourFileName.txt", overwrite = TRUE)

## End(Not run)

backblazer documentation built on May 30, 2017, 6:15 a.m.