How to find a file using MDD Library for PIC32

185 Views Asked by At

I have a PIC32 microcontroller with a SD Card attached to my design and I'm using the MDD library to implement an algorithm in order to find a specific file in the SD CARD.

Is there someone, who can guide/tell me, which function should I use?

1

There are 1 best solutions below

0
On BEST ANSWER

Use the FindFirst/FindNext functions to search for files. If you need to find a file in a directory tree you can call your own search function recursively:

  • FindFirst for all files (*.*), if first found file matches the file you're looking for - return result

  • FindNext in a loop...

  • If a file matches - return result

  • If you find a directory, set the current working directory to that directory and call your searchfunction recursively

  • If you find no more files - return failure