Here is a stripped down example you can try using a XIAO SAMD21, then try compiling it for a XIAO ESP32C3
Here is the link to the Espressif ESP32 Arduino github for the SD library - look at the source files (.cpp & .h), follow the links to the other Espressif ESP32 libraries that are included in the library.
Here is the link to the standard Arduino SD library, in this library (which works with XIAO SAM21), you’d notice the links in the SD.h to include file utility items (different directory under SD), the Utility directory includes the FAT structure and definitions.
It looks like Espressif only implemented some of the file system library functions. I suspect that has been the same with some of their other library functions in the Espressif github.