-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
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
Cloud Storage Delete all files with prefix #680
Comments
Since there's no API call for this, it'd really be a shortcut for... bucket.getFiles({ prefix: 'directory/'}, function(err, files, ...) {
for (var i in files) {
files[i].delete();
}
}); which could be super misleading about what's actually happening, and might fail half-way through (it wouldn't be an atomic operation). That said, I'll leave this open for discussion... /cc @stephenplusplus : This (to me) feels like the whole "delete bucket even if it isn't empty" thing where people are going to do it, so we might as well help them do it right (and then if we add an API call to do such a thing, we can swap it for that under the hood without anyone caring). /cc @Capstan : Any chance we're going to add a long-running operation to delete multiple files in a single request using the same query parameters we provide to |
I think this is a good idea. Will PR. |
@jgeewax Support for additional long-running operations is on our roadmap, yes. As for what the method looks like is still undecided. It may not look like list objects at all. It may cleave more to lifecycle management instead. If you have some specific use cases / design goals in mind, it'd be helpful. (e.g., do you care about people adding objects after the operation starts being deleted or not?) |
* chore(deps): upgrade gapic-generator-java to 2.4.1 PiperOrigin-RevId: 422607515 Source-Link: googleapis/googleapis@ba2ffd6 Source-Link: googleapis/googleapis-gen@73ba4ad Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNiYTRhZGQyMzlhNjE5ZGE1NjdmZmJkNGU1NzMwZmRkNmRlMDRkMyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/1375dc8f-6e92-47e5-b704-19ee285b9aaf/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: googleapis/googleapis@d189e87
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/1375dc8f-6e92-47e5-b704-19ee285b9aaf/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: googleapis/googleapis@d189e87
It would be nice if there was a bulk delete for files that satisfy a query in a bucket. Something like:
The text was updated successfully, but these errors were encountered: