ESP_VFS get total bytes / used bytes

I have a few different virtual filesystem mounts (SPIFFS on ‘/’, SDFS on ‘/sd’) and I need to know how much space is available in each when working in that path. It doesn’t appear that ‘statvfs’ is available. How would I do this in esp-idf?

Any help is appreciated.

For SD card: esp-idf/sdmmc_common.c at 16a4ee7c36a848ca155791677ce011f3ca75c519 · espressif/esp-idf · GitHub

For SPIFFS: esp-idf/spiffs_example_main.c at master · espressif/esp-idf · GitHub

Ok… I was hoping for an esp_vfs function that I could call for either path that would give me the info without having to handle each individually. Thanks.

Maybe Espressif people know more than me. Try posing the question on https://esp32.com/ explicitly.