MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / add_directory

Method add_directory

tools/change_namespace/AddPaths.cpp:29–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void
30ChangeNamespace::add_directory(fs::path const& p)
31{
32 if (fs::path(m_cppms_src_path / p) == fs::path(m_cppms_src_path / "tools" / "change_namespace"))
33 {
34 return;
35 }
36
37 // Parse files and directories
38 for (auto const& entry : fs::directory_iterator(m_cppms_src_path / p))
39 {
40 std::string s = entry.path().string();
41 s.erase(0, m_cppms_src_path.string().size() + 1);
42
43 fs::path np = s;
44 if (!m_dependencies.count(np))
45 {
46 m_dependencies[np] = p; // set up dependency tree
47 add_pending_path(np);
48 }
49 }
50}
51
52void
53ChangeNamespace::add_file(fs::path const& p)

Callers

nothing calls this directly

Calls 3

eraseMethod · 0.45
sizeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected