opendir function does not work with SDFileSystem

28 Nov 2012

Hi,

About, after mbed v44 system.
opendir() function can not get sd directory pointer.
It's bug or method was changed?

    SDFileSystem *sd = new SDFileSystem( p5, p6, p7, p8,  "sd" );

    DIR *d;
    struct dirent *p;
    d = opendir( "/sd" );
    if ( d != NULL ) {
        while ( ( p = readdir( d ) ) != NULL ) {
            pc.printf( "/sd/%s\n", p->d_name );
        }
        closedir( d );
    } else {
        pc.printf( "No SD card.\n" );
    }
28 Nov 2012

mwi suzuki wrote:

About, after mbed v44 system. opendir() function can not get sd directory pointer. It's bug or method was changed?

It was a bug, thank you for reporting it.

We fixed it in Rev 48.

Cheers, Emilio

28 Nov 2012

thanks a lot.