MCPcopy Create free account
hub / github.com/creatale/node-dv / glob

Method glob

deps/opencv/modules/core/src/glob.cpp:260–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void cv::glob(String pattern, std::vector<String>& result, bool recursive)
261{
262 result.clear();
263 String path, wildchart;
264
265 if (isDir(pattern, 0))
266 {
267 if(strchr(dir_separators, pattern[pattern.size() - 1]) != 0)
268 {
269 path = pattern.substr(0, pattern.size() - 1);
270 }
271 else
272 {
273 path = pattern;
274 }
275 }
276 else
277 {
278 size_t pos = pattern.find_last_of(dir_separators);
279 if (pos == String::npos)
280 {
281 wildchart = pattern;
282 path = ".";
283 }
284 else
285 {
286 path = pattern.substr(0, pos);
287 wildchart = pattern.substr(pos + 1);
288 }
289 }
290
291 glob_rec(path, wildchart, result, recursive);
292 std::sort(result.begin(), result.end());
293}

Callers

nothing calls this directly

Calls 7

isDirFunction · 0.85
glob_recFunction · 0.85
sortFunction · 0.85
clearMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected