nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ sd_card_list_files()

int sd_card_list_files ( char const *const  path,
char *  buf,
size_t *  buf_size 
)

Print out the contents under SD card root path and write the content to buffer.

Parameters
[in]pathPath of the folder which is going to be listed. If assigned path is null, then listing the contents under root. If assigned path doesn't exist, an error will be returned.
[out]bufBuffer where data is written. If set to NULL, it will be ignored.
[in,out]buf_sizeBuffer size.
Return values
0on success.
-EPERMSD card operation is ongoing somewhere else.
-ENODEVSD init failed. SD card likely not inserted.
-EINVALFailed to append to buffer.
-FR_INVALID_NAMEPath is too long.
Otherwise,errorfrom underlying drivers.