thisbejim / Pyrebase

A simple python wrapper for the Firebase API.
2.05k stars 526 forks source link

How to delete directory? - Storage #307

Open Nv7-GitHub opened 4 years ago

Nv7-GitHub commented 4 years ago

I want to delete a directory, such as storage.child("images").child("some_random_directory"). I tried to do something like storage.child("images").delete("some_random_directory"), but that didn't work. After some further research, I found that you have to delete all the files in a directory, and that would delete the directory. So, I tried to loop through storage.child("images").child("some_random_directory").list_files(). Alas, this returned all the files in the storage, starting from the root directory. I also tried doing storage.child("images/some_random_directory").list_files(), but this also returned every file in storage. How could I delete the specified directory?

stack-raghav commented 2 years ago

Hey found any solution yet? I want the same thing!