MCPcopy Create free account
hub / github.com/Samsung/rlottie / jsonFiles

Method jsonFiles

example/evasapp.cpp:130–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130std::vector<std::string>
131EvasApp::jsonFiles(const std::string &dirName, bool /*recurse*/)
132{
133 DIR *d;
134 struct dirent *dir;
135 std::vector<std::string> result;
136 d = opendir(dirName.c_str());
137 if (d) {
138 while ((dir = readdir(d)) != NULL) {
139 if (isJsonFile(dir->d_name))
140 result.push_back(dirName + dir->d_name);
141 }
142 closedir(d);
143 }
144
145 std::sort(result.begin(), result.end(), [](auto & a, auto &b){return a < b;});
146
147 return result;
148}
149

Callers

nothing calls this directly

Calls 3

isJsonFileFunction · 0.70
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected