-
Notifications
You must be signed in to change notification settings - Fork 44
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
Re-factor cmd functions to library #524
Conversation
yeah I agree list command is pretty straight forward, but with unixfs it's little complex. my aim was to just get all the CIDs in a car as output from function i.e. I provide path and get the result as root cid and rest as array. Can be skipped though as root gives the root cid which is needed mostly. |
I don't understand the extract wrapper you're asking for - can you provide the method signature? |
I implemented it like this
My need mostly was to extract files thus have commented out the directory functions (kept comments just in case need arises), basically it just takes in input and output file and gives the car, most use cases are like this only. |
Added a helper - close enough to what you're after? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Address all but
list
as requested in #523@lordshashank - list seems to be really focused on a bunch of different textual printed output - i'm not really sure what a library variant of it would be vs what's already provided in the main carv2 library interface - can you specify if there's something specific you're after there?