21 Commits

Author SHA1 Message Date
Joonas Koivunen
d2ea05f64a doc: update comments regarding buckets 2020-08-14 10:32:10 +03:00
Caio
457cd428fa Remove inconsistent variants 2020-08-13 10:24:35 -03:00
Caio
09f44d18f2 Use mutable ref instead of taking ownership
Walker was being moved for each iteration and this was being a problem
for proper `Entry` matching.

Removes `Item` indirection and `continue_walk(self, ...)` is now
`inspect(&mut self, ...)`.
2020-08-09 13:52:14 -03:00
Caio
1f8cd25fd9 Split Entry into two different enums 2020-07-31 08:39:47 -03:00
Joonas Koivunen
3bfa506f69 refactor: suggestions from code review
Including mostly comment fixes and removal of an extra &mut.

Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6be2556341 chore: cargo fmt 2020-06-17 17:27:05 +03:00
Joonas Koivunen
9b75c16143 fix(unixfs/ex): simplify get back to listing 2020-06-17 17:27:05 +03:00
Joonas Koivunen
6a96593866 refactor: make Walker easier to use
turns out the internal structure almost supported this already, but
`self.current` needed to be done an Option.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
f71c212edd chore: fmt and clippy warnings 2020-06-17 17:27:05 +03:00
Joonas Koivunen
948eeff48f refactor: rename FileMetadata to ipfs_unixfs::Metadata 2020-06-17 17:27:05 +03:00
Joonas Koivunen
9b18427e16 refactor: move ipfs_unixfs::dir::walk to top level 2020-06-17 17:27:05 +03:00
Joonas Koivunen
c61d55d940 fix: start now returns ContinuedWalk, root name 2020-06-17 17:27:05 +03:00
Joonas Koivunen
6671e74113 feat: /get http endpoint
does not at all pass any tests. we need to add a root path param, which
will be a string version of the requested Cid for the http api. Also,
with this, it becomes possible to hide everything (files, symlinks)
under a single walk api.
2020-06-17 17:26:39 +03:00
Joonas Koivunen
dafbf4915e wip: add symlinks and hamt sharded dirs 2020-06-17 17:26:39 +03:00
Joonas Koivunen
c1a0943559 wip: sneak in most of the private parts of tar-rs 2020-06-17 17:26:39 +03:00
Joonas Koivunen
eec4598c90 doc: apply suggestions from code review
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:24:23 +03:00
Joonas Koivunen
1367e50f59 refactor: FileSegment to struct
instead of destructing perhaps provide sometimes useful getters
2020-06-17 17:24:23 +03:00
Joonas Koivunen
d74a9bed0f refactor: dry unixfs/examples/get 2020-06-17 17:24:23 +03:00
Joonas Koivunen
1c2981b73c feat: print sha256 in examples/get.rs 2020-06-17 17:24:23 +03:00
Joonas Koivunen
7590da67f3 feat: make different file segments easier to distinguish 2020-06-17 17:24:23 +03:00
Joonas Koivunen
d62da31a62 add: unixfs/examples/get.rs
the example will list all files in the tree and visit them.
2020-06-17 17:24:23 +03:00