-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
|
||
### No easy way to directly add a directory to MFS with go-ipfs | ||
|
||
Adding a directory of files to MFS means calling out to `ipfs files write` for every file, ideally there should be one command to write a directory of files to MFS. |
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.
Technically you can do
ipfs files cp /ipfs/$(ipfs add -rq dir) /some/mfs/path
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.
@magik6k good point, handy for the initial adding but I don't believe that doesn't help with some of the other restrictions of adding/updating some content later, although sounds like ipfs/kubo#6036 will help with that
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.
Yeah, updating is tricky, perhaps storing mod times with files would help with that, but it's not supported yet (https://github.com/ipfs/unixfs-v2 is what we need)
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.
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.
For posterity, I'll mention that I'm currently working on a variant of go-ipfs
that has writable access to the Files(MFS) and Name(IPNS) APIs, through the FUSE API.
While not fully viable today, I would like it to be capable of hosting a living/mutable package repo in the same way a traditional filesystem can (to the specifications our users expect).
Some issues I encountered while writing this have been resolved already, but there's a handful that are not simple fixes. Since this demand is pretty broad, I look forward to bugging collaborating with a bunch of us here to try and harmonize some of the next iterations of these APIs and formats to enable this kind of use case.
@aschmahmann's current work on IPNS will also likely have a bearing on this. I have an implementation to expose IPNS keys as writable files and directories through MFS which may be useful for package managers. It's basically an abstraction on the existing common pattern (modify a root via ipfs files
-> stat changes -> name publish
)
|
||
Adding a directory of files to MFS means calling out to `ipfs files write` for every file, ideally there should be one command to write a directory of files to MFS. | ||
|
||
Alternative approach may be to mount MFS as a fuse filesystem (ala https://github.com/tableflip/ipfs-fuse) |
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.
There is also a new mfs mounting feature brewing in go-ipfs - ipfs/kubo#6036
Starting to document the known issues blocking rolling out support for different categories of package manager.
Rendered preview over here: https://github.com/protocol/package-managers/blob/blockers/blockers.md