AnsweredAssumed Answered

File system about read filename

Question asked by weiyu on Aug 24, 2011
Latest reply on Sep 6, 2011 by weiyu

Hi,

I used bf548 to read SD card's filename.

The   additional DMV.7z, Decompress it, then copy DMV1000 directory to SD  card.
I used this  codes to read this DMV1000 directory's files:
void  SDCARD_TEST(void)
{
    struct dirent *pDirEntry = NULL;    
    DIR  *pDir = NULL;
    while(chdir("..") == 0) ; // go to  root
      chdir("DMV1000");

     pDir = opendir(".");
     if(pDir !=  NULL)
     {
          do
          {
               pDirEntry =  readdir(pDir);
               if (pDirEntry != NULL)
                {
                    printf("\n%s", pDirEntry->d_name);
                }
          } while (pDirEntry);
     }
      closedir(pDir);
}
It only get  ".","..", and "P040" directory name,but can not get DSP 94.txt, MCU 146.txt  filenames.

Attachments

Outcomes