|
http://elm-chan.org/fsw/ff/doc/findfirst.html
- /* Search a directory for objects and display it */
- void find_image_file (void)
- {
- FRESULT fr; /* Return value */
- DIR dj; /* Directory search object */
- FILINFO fno; /* File information */
- fr = f_findfirst(&dj, &fno, "", "dsc*.jpg"); /* Start to search for photo files */
- while (fr == FR_OK && fno.fname[0]) { /* Repeat while an item is found */
- printf("%s\n", fno.fname); /* Display the object name */
- fr = f_findnext(&dj, &fno); /* Search for next item */
- }
- f_closedir(&dj);
- }
复制代码 |
|