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

Function test_copy_dir_recursive_tree

test/copy_test.cpp:208–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void test_copy_dir_recursive_tree(fs::path const& root_dir)
209{
210 std::cout << "test_copy_dir_recursive_tree" << std::endl;
211
212 fs::path target_dir = fs::unique_path();
213
214 fs::copy(root_dir, target_dir, fs::copy_options::recursive | fs::copy_options::directories_only);
215
216 directory_tree tree = collect_directory_tree(target_dir);
217
218 BOOST_TEST_EQ(tree.size(), 4u);
219 BOOST_TEST(tree.find("d1") != tree.end());
220 BOOST_TEST(tree.find(fs::path("d1") / "d1") != tree.end());
221 BOOST_TEST(tree.find(fs::path("d1") / "d2") != tree.end());
222 BOOST_TEST(tree.find("d2") != tree.end());
223
224 fs::remove_all(target_dir);
225}
226
227void test_copy_file_symlinks(fs::path const& root_dir)
228{

Callers 1

mainFunction · 0.85

Calls 7

collect_directory_treeFunction · 0.85
pathFunction · 0.70
unique_pathFunction · 0.50
copyFunction · 0.50
remove_allFunction · 0.50
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected