We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It won't let you delete the bucket if a versioned object still in there. a few hoops to go through to delete them too
gcp_gcs_delete_bucket <- function(bucket){ # have to delete all objects in a bucket first os <- googleCloudStorageR::gcs_list_objects(bucket, versions = TRUE, detail = "full") safe_delete <- function(x, bucket, version = NULL){ tryCatch({ googleCloudStorageR::gcs_delete_object(x, bucket = bucket, generation = version) }, error = function(ex) { NULL }) } lapply(os$name, safe_delete, bucket = bucket) mapply(safe_delete, x = os$name, version = os$generation, MoreArgs = list(bucket = bucket)) bb <- googleCloudStorageR::gcs_get_bucket(bucket) googleCloudStorageR::gcs_delete_bucket(bb$name) }
The text was updated successfully, but these errors were encountered:
Above now in gcs_delete_bucket_objects() and gcs_delete_bucket(force_delete=TRUE)
gcs_delete_bucket_objects()
gcs_delete_bucket(force_delete=TRUE)
Sorry, something went wrong.
add gcs_delete_bucket_objects #152
7015555
No branches or pull requests
It won't let you delete the bucket if a versioned object still in there. a few hoops to go through to delete them too
The text was updated successfully, but these errors were encountered: