Skip to content

feat: files (mfs) api implementation#6786

Closed
hacdias wants to merge 3 commits intoipfs:masterfrom
hacdias:feat/coreapi-files
Closed

feat: files (mfs) api implementation#6786
hacdias wants to merge 3 commits intoipfs:masterfrom
hacdias:feat/coreapi-files

Conversation

@hacdias
Copy link
Copy Markdown
Member

@hacdias hacdias commented Dec 6, 2019

This implements the Files (MFS) API

  • Interface: feat: files (mfs) api interface-go-ipfs-core#54
  • Moves almost all ipfs files <cmd> related code to an helper package called fileshelpers
  • Implements the API for all interfaces
  • Keeps current functionality, but changes the meaning of count=0 in files write and files read. To simplify, if count equals 0, then we want to write or read everything. It doesn't even make sense to not read or not write anything.

License: MIT
Signed-off-by: Henrique Dias hacdias@gmail.com

@hacdias
Copy link
Copy Markdown
Member Author

hacdias commented Dec 6, 2019

@Stebalien I started working on this to support Files API through Core API. I wanted to ask you if you feel this is the right direction...

I created a fileshelpers package so I didn't repeat as much code between commands and Core API.

@Stebalien
Copy link
Copy Markdown
Member

I think this is the right direction. We can unify the unixfs and files APIs later (and deprecate this interface when we do that).

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias hacdias changed the title feat: files api core api feat: files (mfs) api core api Dec 7, 2019
@hacdias hacdias changed the title feat: files (mfs) api core api feat: files (mfs) api implementation Dec 7, 2019
@hacdias
Copy link
Copy Markdown
Member Author

hacdias commented Dec 7, 2019

@Stebalien I think this is done and only needs to merge the interface and remove the replace here.

I don't understand why sharness tests are failing. I checked on my laptop and only mounting ones seem to be failing.

@hacdias hacdias marked this pull request as ready for review December 7, 2019 13:00
@Stebalien
Copy link
Copy Markdown
Member

I'm not sure why they're passing for you. Try running:

> cd test/sharness
> make deps
> ./t0250-files-api.sh -v -i # -v means verbose, -i means "stop immediately on failure"

ipfs files read --count 0 is returning too many bytes. It looks like lengths and offsets need to be handled.

@hacdias
Copy link
Copy Markdown
Member Author

hacdias commented Jun 19, 2021

@Stebalien is this something still desirable or has it been done/can be closed? I don't have time in the foreseeable future to work on this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants