MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / getFiles

Method getFiles

src/FolderData.cpp:140–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140std::vector<FileData*> FolderData::getFiles(bool onlyFiles) const
141{
142 std::vector<FileData*> temp;
143 //now check if a child is a folder and get those children in turn
144 std::vector<FileData*>::const_iterator fdit = mFileVector.cbegin();
145 while(fdit != mFileVector.cend()) {
146 //dynamically try to cast to FolderData type
147 FolderData * folder = dynamic_cast<FolderData*>(*fdit);
148 if (folder != nullptr) {
149 //add this only when user wanted it
150 if (!onlyFiles) {
151 temp.push_back(*fdit);
152 }
153 }
154 else {
155 temp.push_back(*fdit);
156 }
157 ++fdit;
158 }
159 return temp;
160}
161
162std::vector<FileData*> FolderData::getFilesRecursive(bool onlyFiles) const
163{

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected