MCPcopy Create free account
hub / github.com/davisking/dlib / get_all_sub_dirs

Function get_all_sub_dirs

dlib/dir_nav/dir_nav_extensions.cpp:15–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 namespace implementation_details
14 {
15 void get_all_sub_dirs (
16 const directory& top_of_tree,
17 unsigned long max_depth,
18 std::vector<directory>& result,
19 std::vector<directory>& temp
20 )
21 {
22 if (max_depth > 0)
23 {
24 top_of_tree.get_dirs(temp);
25 const unsigned long start = result.size();
26 result.insert(result.end(), temp.begin(), temp.end());
27 const unsigned long end = start + temp.size();
28
29 for (unsigned long i = start; i < end; ++i)
30 {
31 get_all_sub_dirs(result[i], max_depth-1, result, temp);
32 }
33 }
34 }
35 }
36
37// ----------------------------------------------------------------------------------------

Callers 1

Calls 5

get_dirsMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected