#include <applications/nrf_audio/src/modules/sd_card.h>
Find all files on SD card that match the given pattern.
- Note
- The function uses a recursive approach with internal buffers. Memory intensive.
- Parameters
-
| [in] | result_file_num_max | Maximum number of files to be found. |
| [in] | result_file_len_max | Maximum length of each file name including total path length |
| [out] | result | Pointer to the result array of dimension result_file_num_max
|
| [in] | path | NULL, search from root, otherwise search from the given path. Note not to add an ending "/" |
| [in] | pattern | Null terminated pattern to find, e.g. *.lc3 or *.wav |
- Return values
-
| Number | of files found. |
| -EINVAL | invalid parameters. |
| -ENOMEM | out of memory. |
| -ENODEV | SD init failed. SD likely not inserted. |
| -EPERM | SD card operation is ongoing somewhere else. |
| -Other,error | from underlying drivers. |