Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Enhancing tree() #198

Open
vmx opened this issue Mar 19, 2019 · 0 comments
Open

Enhancing tree() #198

vmx opened this issue Mar 19, 2019 · 0 comments

Comments

@vmx
Copy link
Member

vmx commented Mar 19, 2019

Currently tree() is quite limited. @Gozala proposes at #191 (comment) a more flexible API:

I find tree to be a confusing name especially since it just returns paths. I think paths or list would have being far more clear.

I also kind of wish there was a way to traverse without following every branch .traverse(cid, path, {follow:path => boolean, order:path[] => path[] }) that way traverse(cid, path) is shallow, and .traverse(cid, path, {follow:Boolean}) is recursive, but it also provides an opportunity to avoid traversing irrelevant paths. As of order it can provide a way to choose traversal scheme e.g. depth-first could be as simple as returning path with most path components first.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant