MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / print_tree

Function print_tree

src/cli/main.cpp:181–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void print_tree(const lmpfs::vfs::NodePtr& n, std::string indent = "") {
182 fmt::print("{}{}{}\n", indent, n->is_dir() ? "[DIR] " : " ", n->name());
183 if (n->is_dir()) for (auto& e : n->list()) print_tree(e.node, indent + " ");
184}
185
186// ---- stdout color ---------------------------------------------------------
187// Colour is opt-out: on when stdout is a real terminal and NO_COLOR is unset,

Callers 1

mainFunction · 0.85

Calls 2

is_dirMethod · 0.80
listMethod · 0.80

Tested by

no test coverage detected