View Source Harness.Tree (Harness v0.8.3)
Renders things as a tree
See the original implementation in Mix here.
The original implementation has an optimization for dependency trees which prevents showing the same dependency tree twice. That's great for printing small dependency trees, but for file trees, we want to see the entire tree every time, even if a file or directory name is present many times.
The changes to the original implementation are shown as comments below:
Summary
Functions
Prints the given tree according to the callback.
The callback will be invoked for each node and it
must return a {printed, children}
tuple.
Functions
Prints the given tree according to the callback.
The callback will be invoked for each node and it
must return a {printed, children}
tuple.