// Swift code
let storageRef = FIRStorage.storage().reference().child("path/to/directory")
storageRef.deleteWithCompletion { (error) in
print("error: \(error)")
print("------------")
}
Hi Ishaq,
Great to meet you. There isn’t a way to delete a directory from the Storage SDK. Generally speaking, you want to store a list of your files somewhere, such as Database, and use that reference to delete en masse.
Note that as a non-scalable answer, you can delete a path from the CLI using the GCS tools:
gsutil rm gs://bucket/subdir/**
And it looks like GCS also has an API method for listing contents of a directory if that’s needed.
I hope that helps!
☼, Kato
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/1d975b85-fc3c-4ae3-8620-5588d5fd94d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/361c65d3-5ee1-4d34-b6c9-f160853a6fa1%40googlegroups.com.