118 Commits

Author SHA1 Message Date
Joonas Koivunen
87e02703de chore: update CHANGELOG 2020-06-24 10:38:19 +03:00
Joonas Koivunen
8ef1811f14 refactor: remove/cfg(test) unused of FileReader 2020-06-24 10:25:39 +03:00
Joonas Koivunen
79d6e8c680 fix: hide file::reader
Fixes #202. Apparently this can fail compilation on 1.44. The content
method on FileReader exposes a non-public item through impl
Iterator<Item = (..., non_pub_here)> but still the error is about
lifetime capture.
2020-06-24 10:22:17 +03:00
Joonas Koivunen
e19677ae01 add(unixfs): repository, description, readme 2020-06-18 20:41:32 +03:00
Joonas Koivunen
be1d3b3891 refactor(unixfs): drop unused tar dependency 2020-06-18 20:24:57 +03:00
Joonas Koivunen
9835da8f08 add(unixfs): initial CHANGELOG.md 2020-06-18 20:24:57 +03:00
Joonas Koivunen
740c5f1cd7 chore(unixfs): README, license notes, set version to 0.0.1 2020-06-18 20:24:57 +03:00
Joonas Koivunen
a867cc8e28 chore: cargo fmt 2020-06-17 23:09:05 +03:00
Joonas Koivunen
baa78d6098 fix: forgotten unused error variant (File) 2020-06-17 22:10:42 +03:00
Joonas Koivunen
cc2239abbb fix: warnings on ipfs_unixfs::walk 2020-06-17 22:09:52 +03:00
Joonas Koivunen
1479b5022a fix: remove lint suppressions 2020-06-17 22:09:02 +03:00
Joonas Koivunen
0c5ad592a7 doc: add missing "for"
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
a6167fc556 chore: cargo fmt 2020-06-17 17:27:05 +03:00
Joonas Koivunen
c70320dd6c refactor: suggestions from code review
docs, comments and minor API changes again.

Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
b43ec1e9b2 refactor: solidify link conversion 2020-06-17 17:27:05 +03:00
Joonas Koivunen
629e3388b8 refactor: unify InnerKind, switch todos to unreachable 2020-06-17 17:27:05 +03:00
Joonas Koivunen
ee8cab71d9 fix: remove dead code on bucket -> bucket transitions 2020-06-17 17:27:05 +03:00
Joonas Koivunen
7b7ddbbe2b fix: add back self.depth assertions in set_path 2020-06-17 17:27:05 +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
0d2dd477e9 doc: refresh and check out cargo docs 2020-06-17 17:27:05 +03:00
Joonas Koivunen
ed8a2c3d66 doc: update unixfs/README.md and docs
added hints about users preferring to use `ipfs_unixfs::walk::Walker`.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
bfd8722ae4 refactor: rename dir submodule to directory
also the file was forgotten.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6be2556341 chore: cargo fmt 2020-06-17 17:27:05 +03:00
Joonas Koivunen
1d50a5195c fix: check dirs and hamtshards supported
this is probably being overly strict but at least there will not be any
misunderstandings.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
d589e90160 refactor(unix): split test_support with FakeBlockstore 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
9151834ba3 chore: cleanup warnings, fmt 2020-06-17 17:27:05 +03:00
Joonas Koivunen
f3f9f26c9b refactor: remove unused code 2020-06-17 17:27:05 +03:00
Joonas Koivunen
7983fcf3b0 chore: cargo fmt 2020-06-17 17:27:05 +03:00
Joonas Koivunen
062468c108 add: test case for checking filesegments 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
d61b0424d8 fix: use errors instead of unwraps in /get as well 2020-06-17 17:27:05 +03:00
Joonas Koivunen
d16a2645f6 fix: errors during walking 2020-06-17 17:27:05 +03:00
Joonas Koivunen
fcdf59aac8 doc: document public members 2020-06-17 17:27:05 +03:00
Joonas Koivunen
91635181c4 refactor: remove home-grown Either 2020-06-17 17:27:05 +03:00
Joonas Koivunen
f37974a19d doc: document Walker and friends 2020-06-17 17:27:05 +03:00
Joonas Koivunen
1e0dd4e93e add(unixfs): sharded to non-sharded resolving test 2020-06-17 17:27:05 +03:00
Joonas Koivunen
81233dd82a add: top level symlink support 2020-06-17 17:27:05 +03:00
Joonas Koivunen
08fa4c77f5 add: top level file support 2020-06-17 17:27:05 +03:00
Joonas Koivunen
182da8d3d6 add root level test cases 2020-06-17 17:27:05 +03:00
Joonas Koivunen
585b521606 refactor: split two scenario tests 2020-06-17 17:27:05 +03:00
Joonas Koivunen
5e369241db refactor: prettify tests 2020-06-17 17:27:05 +03:00
Joonas Koivunen
6255f3c650 fix: root paths for dirs and sharded 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
769ae5bb07 feat: keep track of file size
it would probably be enough to just give it out on the first iteration,
maybe?
2020-06-17 17:26:39 +03:00