List of filenames in folder


#1

Hi!
Is there any way to return filename string by index in specific folder? I also need to know total number of files in the folder.
To switch wav files in wave/playstereo but files will be different from time to time, so I can not define names constantly.


#2

yes, using f_readdir , you can get details in chibios/ext/fatfs/src/ff.h
make sure you do in a separate thread, as otherwise you'll glitch the audio.


#3

Thank you!
It works good.


#4

Did you make an object out of that function?
I would love to have a look at how you manage to use it :slight_smile: