MCPcopy Create free account
hub / github.com/andysworkshop/stm32plus / readImageCacheStatus

Method readImageCacheStatus

examples/pframe/FileSystemManager.cpp:54–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 */
53
54void FileSystemManager::readImageCacheStatus() {
55
56 DirectoryIterator *it;
57
58 // preset for not-set
59
60 _imagesAreCached=false;
61
62 // iterate the pframe directory
63
64 if(!_fs->getDirectoryIterator("/pframe",it))
65 return;
66
67 while(it->next()) {
68
69 if(!strncasecmp("cacheloc-",it->current().getFilename(),9)) {
70 _firstCacheBlock=atoi(it->current().getFilename()+9);
71 _imagesAreCached=true;
72 break;
73 }
74 }
75
76 delete it;
77}
78
79
80/*

Callers

nothing calls this directly

Calls 4

getDirectoryIteratorMethod · 0.80
nextMethod · 0.45
getFilenameMethod · 0.45
currentMethod · 0.45

Tested by

no test coverage detected