S3 - Delete all files under a folder (recursive delete) #529
Labels
feature-request
A feature should be added or improved.
high-level-library
p2
This is a standard priority issue
Describe the feature
Delete all files underneath a folder (recursive delete) using a prefix.
Use Case
It would be nice to be able to give the prefix and delete under it versus trying to iterate through all the objects and deleting them individually.
ex. Bucket structure
Delete everything under "folder1/"
Proposed Solution
Ideally it would be nice if delete_objects took the prefix builder function argument.
ex.
A possible workaround for right now might be, iterating through all the objects then building the delete_objects vec using the iterated page keys. Though I'm not sure if there's any gotchas or issues with this approach.
Other Information
Possible temporary workaround provided in proposed solution.
Acknowledgements
A note for the community
Community Note
The text was updated successfully, but these errors were encountered: