Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unixfs: add a directory interface #5160

Merged
merged 2 commits into from
Jul 16, 2018
Merged

unixfs: add a directory interface #5160

merged 2 commits into from
Jul 16, 2018

Commits on Jul 9, 2018

  1. unixfs: add a directory interface

    Add a UnixFS `Directory` that hides implementation details and helps to
    distinguish *what* is a UnixFS directory.
    
    Replace the `unixfs.io.Directory` structure that contained the HAMT and basic
    directory implementations (through inner pointers) with an interface containing
    the same methods. Implement those methods in two clearly distinct structures for
    each implementation (`BasicDirectory` and `HAMTDirectory`) avoiding pointer
    logic and clearly differentiating which implementation does what.
    
    The potential basic to HAMT transition was being hidden behind the `AddChild`
    call at the UnixFS layer (changing one implementation pointer  with the other
    one), it is now being explicitly done at the MFS layer.
    
    Rename the `dirbuilder.go` file to `directory.go` and change the `Directory` MFS
    attribute `dirbuilder` to `unixfsDir` to be consistent.
    
    License: MIT
    Signed-off-by: Lucas Molas <schomatis@gmail.com>
    schomatis committed Jul 9, 2018
    Configuration menu
    Copy the full SHA
    7d531c0 View commit details
    Browse the repository at this point in the history
  2. unixfs: remove unused ShardSplitThreshold variable

    License: MIT
    Signed-off-by: Lucas Molas <schomatis@gmail.com>
    schomatis committed Jul 9, 2018
    Configuration menu
    Copy the full SHA
    c47cd13 View commit details
    Browse the repository at this point in the history