Skip to content

Commit 1cbbeee

Browse files
committed
more doc fixes
1 parent 85d41db commit 1cbbeee

File tree

12 files changed

+45
-8
lines changed

12 files changed

+45
-8
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ drat.sh
1212
^__blobstorage__
1313
^__queuestorage__
1414
^\.github$
15+
^SECURITY\.md$

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ Suggests:
3131
processx,
3232
uuid
3333
Roxygen: list(markdown=TRUE, r6=FALSE, old_usage=TRUE)
34-
RoxygenNote: 7.3.1
34+
RoxygenNote: 7.3.2

NAMESPACE

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
S3method(adls_filesystem,adls_endpoint)
44
S3method(adls_filesystem,character)
5+
S3method(azcopy_download_opts,adls_filesystem)
6+
S3method(azcopy_download_opts,blob_container)
7+
S3method(azcopy_download_opts,file_share)
8+
S3method(azcopy_upload_opts,adls_filesystem)
9+
S3method(azcopy_upload_opts,blob_container)
10+
S3method(azcopy_upload_opts,file_share)
511
S3method(blob_container,blob_endpoint)
612
S3method(blob_container,character)
713
S3method(copy_url_to_storage,blob_container)
@@ -45,6 +51,9 @@ S3method(delete_storage_file,blob_container)
4551
S3method(delete_storage_file,file_share)
4652
S3method(delete_storage_snapshot,blob_container)
4753
S3method(delete_storage_version,blob_container)
54+
S3method(dispose_download_dest,conn_dest)
55+
S3method(dispose_download_dest,file_dest)
56+
S3method(dispose_download_dest,null_dest)
4857
S3method(file_share,character)
4958
S3method(file_share,file_endpoint)
5059
S3method(get_account_sas,az_storage)
@@ -64,6 +73,9 @@ S3method(get_user_delegation_key,blob_endpoint)
6473
S3method(get_user_delegation_sas,az_storage)
6574
S3method(get_user_delegation_sas,blob_endpoint)
6675
S3method(get_user_delegation_sas,default)
76+
S3method(init_download_dest,NULL)
77+
S3method(init_download_dest,character)
78+
S3method(init_download_dest,rawConnection)
6779
S3method(list_adls_filesystems,adls_endpoint)
6880
S3method(list_adls_filesystems,character)
6981
S3method(list_blob_containers,blob_endpoint)
@@ -80,15 +92,21 @@ S3method(list_storage_files,file_share)
8092
S3method(list_storage_snapshots,blob_container)
8193
S3method(list_storage_versions,blob_container)
8294
S3method(multicopy_url_to_storage,blob_container)
95+
S3method(normalize_src,character)
96+
S3method(normalize_src,rawConnection)
97+
S3method(normalize_src,textConnection)
8398
S3method(print,adls_endpoint)
8499
S3method(print,adls_filesystem)
85100
S3method(print,blob_container)
86101
S3method(print,file_share)
87102
S3method(print,storage_endpoint)
103+
S3method(retry_transfer,error)
104+
S3method(retry_transfer,response)
88105
S3method(revoke_user_delegation_keys,az_storage)
89106
S3method(set_storage_metadata,adls_filesystem)
90107
S3method(set_storage_metadata,blob_container)
91108
S3method(set_storage_metadata,file_share)
109+
S3method(sign_request,default)
92110
S3method(storage_container,adls_endpoint)
93111
S3method(storage_container,blob_endpoint)
94112
S3method(storage_container,character)

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666

6767
- ADLS, file and block blob uploads gain the option to compute and store the MD5 hash of the uploaded file, via the `put_md5` argument to `upload_adls_file`, `upload_azure_file` and `upload_blob`.
6868
- Similarly, downloads gain the option to verify the integrity of the downloaded file using the MD5 hash, via the `check_md5` argument to `download_adls_file`, `download_azure_file` and `download_blob`. This requires that the file's `Content-MD5` property is set.
69-
- Add support for uploading to [append blobs](https://docs.microsoft.com/en-us/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs), which are a type of blob optimized for append operations. They are useful for data that is constantly growing, but should not be modified once written, such as server logs. See `?upload_blob` for more details.
70-
- Add support for the [Azurite](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite) and [Azure SDK](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator) storage emulators. To connect to the endpoint, use the service-specific functions `blob_endpoint` and `queue_endpoint` (the latter from the AzureQstor package), passing the full URL including the account name: `blob_endpoint("http://127.0.0.1:10000/myaccount", key="mykey")`. The warning about an unrecognised endpoint can be ignored. See the linked pages for full details on how to authenticate to the emulator.<br/>
69+
- Add support for uploading to [append blobs](https://learn.microsoft.com/en-us/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs), which are a type of blob optimized for append operations. They are useful for data that is constantly growing, but should not be modified once written, such as server logs. See `?upload_blob` for more details.
70+
- Add support for the [Azurite](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite) and [Azure SDK](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-emulator) storage emulators. To connect to the endpoint, use the service-specific functions `blob_endpoint` and `queue_endpoint` (the latter from the AzureQstor package), passing the full URL including the account name: `blob_endpoint("http://127.0.0.1:10000/myaccount", key="mykey")`. The warning about an unrecognised endpoint can be ignored. See the linked pages for full details on how to authenticate to the emulator.<br/>
7171
Note that the Azure SDK emulator is no longer being actively developed; it's recommended to use Azurite.
7272
- Add a 10-second fuzz factor to the default starting datetime for a generated SAS, to allow for differences in clocks.
7373
- More fixes to the directory handling of `list_blobs()`.

R/azcopy.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ azcopy_upload_opts <- function(container, ...)
8181
UseMethod("azcopy_upload_opts")
8282
}
8383

84+
#' @exportS3Method
8485
azcopy_upload_opts.blob_container <- function(container, type="BlockBlob", blocksize=2^24, recursive=FALSE,
8586
lease=NULL, put_md5=FALSE, ...)
8687
{
@@ -90,12 +91,14 @@ azcopy_upload_opts.blob_container <- function(container, type="BlockBlob", block
9091
if(put_md5) "--put-md5")
9192
}
9293

94+
#' @exportS3Method
9395
azcopy_upload_opts.file_share <- function(container, blocksize=2^22, recursive=FALSE, put_md5=FALSE, ...)
9496
{
9597
c("--block-size-mb", sprintf("%.0f", blocksize/1048576), if(recursive) "--recursive",
9698
if(put_md5) "--put-md5")
9799
}
98100

101+
#' @exportS3Method
99102
azcopy_upload_opts.adls_filesystem <- function(container, blocksize=2^24, recursive=FALSE, lease=NULL,
100103
put_md5=FALSE, ...)
101104
{
@@ -123,18 +126,21 @@ azcopy_download_opts <- function(container, ...)
123126
}
124127

125128
# currently all azcopy_download_opts methods are the same
129+
#' @exportS3Method
126130
azcopy_download_opts.blob_container <- function(container, overwrite=FALSE, recursive=FALSE, check_md5=FALSE, ...)
127131
{
128132
c(paste0("--overwrite=", tolower(as.character(overwrite))), if(recursive) "--recursive",
129133
if(check_md5) c("--check-md5", "FailIfDifferent"))
130134
}
131135

136+
#' @exportS3Method
132137
azcopy_download_opts.file_share <- function(container, overwrite=FALSE, recursive=FALSE, check_md5=FALSE, ...)
133138
{
134139
c(paste0("--overwrite=", tolower(as.character(overwrite))), if(recursive) "--recursive",
135140
if(check_md5) c("--check-md5", "FailIfDifferent"))
136141
}
137142

143+
#' @exportS3Method
138144
azcopy_download_opts.adls_filesystem <- function(container, overwrite=FALSE, recursive=FALSE, check_md5=FALSE, ...)
139145
{
140146
c(paste0("--overwrite=", tolower(as.character(overwrite))), if(recursive) "--recursive",

R/download_dest.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ init_download_dest <- function(dest, overwrite)
44
}
55

66

7+
#' @exportS3Method
78
init_download_dest.character <- function(dest, overwrite)
89
{
910
if(!overwrite && file.exists(dest))
@@ -15,12 +16,14 @@ init_download_dest.character <- function(dest, overwrite)
1516
}
1617

1718

19+
#' @exportS3Method
1820
init_download_dest.rawConnection <- function(dest, overwrite)
1921
{
2022
structure(dest, class=c("conn_dest", class(dest)))
2123
}
2224

2325

26+
#' @exportS3Method
2427
init_download_dest.NULL <- function(dest, overwrite)
2528
{
2629
con <- rawConnection(raw(0), "w+b")
@@ -34,18 +37,21 @@ dispose_download_dest <- function(dest)
3437
}
3538

3639

40+
#' @exportS3Method
3741
dispose_download_dest.file_dest <- function(dest)
3842
{
3943
close(dest)
4044
}
4145

4246

47+
#' @exportS3Method
4348
dispose_download_dest.conn_dest <- function(dest)
4449
{
4550
seek(dest, 0)
4651
}
4752

4853

54+
#' @exportS3Method
4955
dispose_download_dest.null_dest <- function(dest)
5056
{
5157
close(dest)

R/sign_request.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ sign_request <- function(endpoint, ...)
1212
}
1313

1414

15+
#' @exportS3Method
1516
sign_request.default <- function(endpoint, verb, url, headers, api, ...)
1617
{
1718
host_url <- httr::parse_url(endpoint$url)

R/storage_utils.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,14 @@ retry_transfer <- function(res)
219219
UseMethod("retry_transfer")
220220
}
221221

222+
#' @exportS3Method
222223
retry_transfer.error <- function(res)
223224
{
224225
grepl("curl", deparse(res$call[[1]]), fixed=TRUE) &&
225226
!grepl("Could not resolve host", res$message, fixed=TRUE)
226227
}
227228

229+
#' @exportS3Method
228230
retry_transfer.response <- function(res)
229231
{
230232
httr::status_code(res) == 400L &&

R/transfer_utils.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ normalize_src <- function(src, put_md5=FALSE)
44
}
55

66

7+
#' @exportS3Method
78
normalize_src.character <- function(src, put_md5=FALSE)
89
{
910
content_type <- mime::guess_type(src)
@@ -19,6 +20,7 @@ normalize_src.character <- function(src, put_md5=FALSE)
1920
}
2021

2122

23+
#' @exportS3Method
2224
normalize_src.textConnection <- function(src, put_md5=FALSE)
2325
{
2426
# convert to raw connection
@@ -33,6 +35,7 @@ normalize_src.textConnection <- function(src, put_md5=FALSE)
3335
}
3436

3537

38+
#' @exportS3Method
3639
normalize_src.rawConnection <- function(src, put_md5=FALSE)
3740
{
3841
content_type <- "application/octet-stream"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
![Downloads](https://cranlogs.r-pkg.org/badges/AzureStor)
55
![R-CMD-check](https://github.com/Azure/AzureStor/workflows/R-CMD-check/badge.svg)
66

7-
This package implements both an admin- and client-side interface to [Azure Storage Services](https://docs.microsoft.com/en-us/rest/api/storageservices/). The admin interface uses R6 classes and extends the framework provided by [AzureRMR](https://github.com/Azure/AzureRMR). The client interface provides several S3 methods for efficiently managing storage and performing file transfers.
7+
This package implements both an admin- and client-side interface to [Azure Storage Services](https://learn.microsoft.com/en-us/rest/api/storageservices/). The admin interface uses R6 classes and extends the framework provided by [AzureRMR](https://github.com/Azure/AzureRMR). The client interface provides several S3 methods for efficiently managing storage and performing file transfers.
88

99
The primary repo for this package is at https://github.com/Azure/AzureStor; please submit issues and PRs there. It is also mirrored at the Cloudyr org at https://github.com/cloudyr/AzureStor. You can install the development version of the package with `devtools::install_github("Azure/AzureStor")`.
1010

@@ -162,7 +162,7 @@ storage_upload(cont, src="logfile2.csv", dest="logfile.csv", type="AppendBlob",
162162

163163
### Interface to AzCopy
164164

165-
AzureStor includes an interface to [AzCopy](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10), Microsoft's high-performance commandline utility for copying files to and from storage. To take advantage of this, simply include the argument `use_azcopy=TRUE` on any upload or download function. AzureStor will then call AzCopy to perform the file transfer, rather than using its own internal code. In addition, a `call_azcopy` function is provided to let you use AzCopy for any task.
165+
AzureStor includes an interface to [AzCopy](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10), Microsoft's high-performance commandline utility for copying files to and from storage. To take advantage of this, simply include the argument `use_azcopy=TRUE` on any upload or download function. AzureStor will then call AzCopy to perform the file transfer, rather than using its own internal code. In addition, a `call_azcopy` function is provided to let you use AzCopy for any task.
166166

167167
```r
168168
# use azcopy to download

0 commit comments

Comments
 (0)