MCPcopy Create free account
hub / github.com/boostorg/build / _traverse_tree

Function _traverse_tree

v2/test/tree.py:186–197  ·  view source on GitHub ↗

Returns a list of all names in a tree.

(t, parent_path)

Source from the content-addressed store, hash-verified

184
185
186def _traverse_tree(t, parent_path):
187 """Returns a list of all names in a tree."""
188 assert not parent_path or parent_path[-1] == "/"
189 full_node_name = parent_path + t.name
190 if t.is_file():
191 result = [full_node_name]
192 else:
193 name_prefix = full_node_name + "/"
194 result = [name_prefix]
195 for i in t.children:
196 result.extend(_traverse_tree(i, name_prefix))
197 return result
198
199
200def _get_text(path):

Callers 1

_do_tree_differenceFunction · 0.85

Calls 1

is_fileMethod · 0.80

Tested by

no test coverage detected