MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / getDirent

Method getDirent

Tactility/Source/app/files/State.cpp:80–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80bool 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}

Callers 1

Calls 2

asScopedLockMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected