mobizt / Firebase-ESP-Client

[DEPRECATED]🔥Firebase Arduino Client Library for ESP8266, ESP32 and RP2040 Pico. The complete, fast, secured and reliable Firebase Arduino client library that supports RTDB, Cloud Firestore, Firebase and Google Cloud Storage, Cloud Messaging and Cloud Functions for Firebase.
MIT License
471 stars 100 forks source link

How to check if a directory exists in Firebase Storage?T #568

Closed Frans400 closed 12 months ago

Frans400 commented 12 months ago

Is there anyway to check if a file exits in the Firebase storage cloud?

something like: Firebase.Storage.doesFileExits(&fbdo, STORAGE_BUCKET_ID, "firmware.bin");

any other alternative to check if a file exits will also help me

thank Mosbizt and all other contributors for this super great library

mobizt commented 12 months ago

There is no folder or file in Firebase Storage and Google Cloud Storage unless objects.

Some valid characters in the path to object, can be use as directory separator but no physical directory created.

The console folder creation and deletion are only for GUI.

mobizt commented 12 months ago

You can only list the objects (known as file) and parse the response for folder from /separator in object (file) path.

For example, the path to object is a/b/c/d/e.txt

The a/b/c/d/e.txt is actually object name, there are no file extension (.txt) and parent folders a, b. c or d.