Skip to content

Commit

Permalink
rm broken delete_azure_dir(recursive=TRUE)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongooi73 committed Jun 30, 2020
1 parent 1a30a9c commit adb2550
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Implement recursive/non-recursive directory listings for `list_blobs`, thanks to @cantpitch. Note that since blob storage doesn't have true directories, there are some warts to be aware of; see the help for `list_blobs` for more details.
- Fixes to the directory detection logic of `list_blobs`. Again, since blob storage doesn't have true directories, the `isdir` column of the `list_blobs` output should be treated as a best guess.
- Remove broken implementation for recursive deleting of subdirectory contents for file storage.

# AzureStor 3.2.1

Expand Down
4 changes: 2 additions & 2 deletions R/file_client_funcs.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ delete_file_share.file_endpoint <- function(endpoint, name, confirm=TRUE, ...)
#' @param info Whether to return names only, or all information in a directory listing.
#' @param src,dest The source and destination files for uploading and downloading. See 'Details' below.
#' @param confirm Whether to ask for confirmation on deleting a file or directory.
#' @param recursive For the multiupload/download functions, whether to recursively transfer files in subdirectories. For `list_azure_dir`, whether to include the contents of any subdirectories in the listing. For `create_azure_dir` and `delete_azure_dir`, whether to recursively create/delete each component of a nested directory path. Note that in all cases this can be slow, so try to use a non-recursive solution if possible.
#' @param recursive For the multiupload/download functions, whether to recursively transfer files in subdirectories. For `list_azure_dir`, whether to include the contents of any subdirectories in the listing. For `create_azure_dir`, whether to recursively create each component of a nested directory path. For `delete_azure_dir`, whether to delete a subdirectory's contents first (not yet supported). Note that in all cases this can be slow, so try to use a non-recursive solution if possible.
#' @param create_dir For the uploading functions, whether to create the destination directory if it doesn't exist. Again for the file storage API this can be slow, hence is optional.
#' @param blocksize The number of bytes to upload/download per HTTP(S) request.
#' @param overwrite When downloading, whether to overwrite an existing destination file.
Expand Down Expand Up @@ -407,7 +407,7 @@ delete_azure_dir <- function(share, dir, recursive=FALSE, confirm=TRUE)
return(invisible(NULL))

if(recursive)
try(delete_azure_dir(share, dirname(dir), recursive=TRUE, confirm=FALSE), silent=TRUE)
stop("Recursive deleting of subdirectory contents not yet supported", call.=FALSE)

invisible(do_container_op(share, dir, options=list(restype="directory"), http_verb="DELETE"))
}
Expand Down
2 changes: 1 addition & 1 deletion man/file.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit adb2550

Please sign in to comment.