d2760bb4d5
294: Remove Walker indirection r=koivunej a=c410-f3r Fixes #200. By using mutable references instead of taking ownership, the following is now possible: ```rust ContinuedWalk::Symlink(bytes, _, path, metadata) => { ... } // Instead of ContinuedWalk::Symlink(bytes, item) => { if let Entry::Metadata(metadata_entry) = item.as_entry() { ... } } ``` Co-authored-by: Caio <c410.f3r@gmail.com> Co-authored-by: Joonas Koivunen <joonas@equilibrium.co> |
||
---|---|---|
.. | ||
benches | ||
examples | ||
src | ||
Cargo.toml | ||
CHANGELOG.md | ||
pb-rs-gen.sh | ||
README.md |
ipfs-unixfs
Goals
- blockstore API independent way to traverse the merkledag
- the core read API does not deal with loading blocks
- instead access to interesting
Cid
s is given
Status
- first iteration of file reader has been implemented
- first iteration of resolving IpfsPath segments through directories has been
implemented
- as the HAMTShard structure is not fully understood, all buckets are searched, however the API is expected to remain the same even if more efficient lookup is implemented
- first iteration of
/get
-like tree walking implemented - creation and alteration of dags has not been implemented
Usage
- The main entry point to walking anything unixfs should be
ipfs_unixfs::walk::Walker
- The main entry point to resolving links under dag-pb or unixfs should be
ipfs_unixfs::resolve
- There is a
ipfs_unixfs::file::visit::FileVisit
utility but it should be considered superceded byipfs_unixfs::walk::Walker
License
MIT or APL2.