MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / addFileEntry

Method addFileEntry

lib/FileMgrService/src/FileMgrService.cpp:228–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 *****************************************************************************/
227
228bool FileMgrService::addFileEntry(FileTableEntry* fileTable, const String& fullPath)
229{
230 bool isAdded = false;
231 FileId fileId;
232
233 for (fileId = 0U; fileId < MAX_FILES; ++fileId)
234 {
235 FileTableEntry* entry = &fileTable[fileId];
236
237 if (true == entry->fullPath.isEmpty())
238 {
239 entry->fullPath = fullPath;
240 entry->removeReq = false;
241 isAdded = true;
242
243 LOG_DEBUG("[%08X][%u] %s - added.", fileTable, fileId, fullPath.c_str());
244 break;
245 }
246 }
247
248 return isAdded;
249}
250
251void FileMgrService::removeFileEntry(FileTableEntry* fileTable, FileId fileId)
252{

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected