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?
I want to delete a directory, such as
storage.child("images").child("some_random_directory")
. I tried to do something likestorage.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 throughstorage.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 doingstorage.child("images/some_random_directory").list_files()
, but this also returned every file in storage. How could I delete the specified directory?