MCPcopy Create free account
hub / github.com/boostorg/filesystem / walk_tree

Function walk_tree

test/operations_test.cpp:701–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

699// recursive_directory_iterator_tests ----------------------------------------------//
700
701int walk_tree(bool recursive)
702{
703 //cout << " walk_tree" << endl;
704 error_code ec;
705 int d1f1_count = 0;
706 for (fs::recursive_directory_iterator it(dir, recursive ? (fs::directory_options::follow_directory_symlink | fs::directory_options::skip_dangling_symlinks) : fs::directory_options::none);
707 it != fs::recursive_directory_iterator();
708 it.increment(ec))
709 {
710 //cout << " " << it->path() << " : " << ec << endl;
711 if (it->path().filename() == "d1f1")
712 ++d1f1_count;
713 }
714 //cout << " last error : " << ec << endl;
715 return d1f1_count;
716}
717
718void recursive_directory_iterator_tests()
719{

Callers 1

Calls 4

filenameMethod · 0.80
pathMethod · 0.80
incrementMethod · 0.45

Tested by

no test coverage detected