How to delete an empty folder? #2520
Labels
api: storage
Issues related to the googleapis/nodejs-storage API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: question
Request for information or clarification. Not an issue.
Hello,
I have a setup where inside my bucket, i organise files based on project
So files are stored as {projectUUID}/{filename}
How do i delete the actual empty folder?
I found that i can use deleteFiles to delete the files inside the folder
await bucket.deleteFiles({
prefix:
${project}/
,});
But this doesn't delete the folder. I tried doing a manual delete of the folder path afterwards but that doesn't seem to work.
I tried removing the trailing '/' but that didn't have an effect either.
I really think this repo could use some basic examples. There is so many super complex examples already there, but there is not a basic example of "Delete multiple files" or a "Delete a folder".
And yes i know technically there are no folders inside the bucket.
The text was updated successfully, but these errors were encountered: