I would like to list all the files and folders in a specific directory inside firebase cloud storage. I have tried using files = storage.list_files() from other stack overflow answers. This lists all the files and folders. I have tried using files = storage.list_files(prefix='images/') but it does not work.
I am using pyrebase4 to initialize the app and I have even provided serviceAccount but it did not work.
bucket = storage.bucket()
bucket.list_blobs(prefix="files/")
Please respond with the libraries you are importing, the syntax of initializing firebase app and finally the code to fetch list of all files from a specific directory in firebase cloud storage.
If the above is not possible, would it be very resource demanding (time & cost) to do a storage.list_files().includes(file_to_be_searched) every time? for let's say, 10k total files.
The example provided is using the firebase admin sdk for python.
Given that you said you are using pyrebase you'd have to use pyrebase
Yes it will to both.