This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

In which sequence f_readdir function reads directory entries?

Suppose there are 3 files (abc.jpg, test.bmp and xyz.png) in SD card. When I use the f_readdir function, I understood that it does not retrieve the files in alphabetical order. So in which sequence it is retrieving the file name? Please share your ideas.

Parents
  • As far as your application is concerned, the order is undefined. This means that, if the order is important to your application, then it is up to your application to perform the require sorting/ordering.

    In practice, the order probably depends on the order in which the entries actually appear on the physical medium. That will depend upon the lifetime history of the card...

Reply
  • As far as your application is concerned, the order is undefined. This means that, if the order is important to your application, then it is up to your application to perform the require sorting/ordering.

    In practice, the order probably depends on the order in which the entries actually appear on the physical medium. That will depend upon the lifetime history of the card...

Children
No data