Print out the contents under SD card root path and write the content to buffer.
- Parameters
-
[in] | path | Path 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] | buf | Buffer where data is written. If set to NULL, it will be ignored. |
[in,out] | buf_size | Buffer size. |
[in] | extra_info | Will append DIR/FILE info to string. |
- Return values
-
0 | on success. |
-EPERM | SD card operation is ongoing somewhere else. |
-ENODEV | SD init failed. SD card likely not inserted. |
-EINVAL | Failed to append to buffer. |
-FR_INVALID_NAME | Path is too long. |
Otherwise,error | from underlying drivers. |