The per-entry metadata() call makes FatFS re-walk the directory by path every time — ~32ms/file on the card, 35s for a 1098-file tree. esp-idf's FAT VFS always fills d_type (DT_DIR/DT_REG from the FILINFO readdir already holds, never unknown) and Rust std maps file_type() onto it stat-free, so the walk is now one readdir pass per directory.