ipfs / go-unixfsnode

An ADL IPLD prime node that wraps go-codec-dagpb's implementation of protobuf to enable pathing
Other
11 stars 5 forks source link

Provide list iterator interface #51

Closed hannahhoward closed 1 year ago

hannahhoward commented 1 year ago

Goals

Allows a UnixFS dirs and HAMT dirs to be interated as a list. This works the same as the MapIterator interface but allows accessing the TSize property.

Note when iterating a HAMT, only leaf nodes are returned, and the Name field is shortened to not include the hamt prefix

willscott commented 1 year ago

I'm proposing that https://github.com/ipfs/go-unixfsnode/pull/60 is a potentially nicer way to expose the functionality that this.

this is mis-using the ipld interface a bit more, and while i don't expect problems from it, i'm a little sketched-out by the overloading.

rvagg commented 1 year ago

I think this is covered by #60 now