nRF Connect SDK API 2.8.99
|
int sd_card_list_files_match | ( | uint16_t | result_file_num_max, |
uint16_t | result_file_len_max, | ||
char | result[][result_file_len_max], | ||
char * | path, | ||
char const *const | pattern ) |
Finds all files on SD card that match the given pattern.
[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 |
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. |