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

Function _traverse_tree

test/tree.py:188–199  ·  view source on GitHub ↗

Returns a list of all names in a tree.

(t, parent_path)

Source from the content-addressed store, hash-verified

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

Callers 1

_do_tree_differenceFunction · 0.85

Calls 1

is_fileMethod · 0.80

Tested by

no test coverage detected