| 78 | } |
| 79 | |
| 80 | bool State::getDirent(uint32_t index, dirent& dirent) { |
| 81 | auto lock = mutex.asScopedLock(); |
| 82 | if (!lock.lock(50 / portTICK_PERIOD_MS)) { |
| 83 | return false; |
| 84 | } |
| 85 | |
| 86 | if (index < dir_entries.size()) { |
| 87 | dirent = dir_entries[index]; |
| 88 | return true; |
| 89 | } else { |
| 90 | return false; |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | } |
no test coverage detected