I want to be able to do a ipfs files cp /ipfs/hash /folder or ipfs files mv /ipfs/hash /folder and it work independently of being a file or a folder. Currently, neither cp or mv have a -r. cp is able to copy the MerkleDAG node that represents a directory, but just once, on the second time I have to remove it first, and since it is a directory, it has to be removed with -r.
could you elaborate a little? i'm not sure what youre looking for here
Apologies for not being clear, what I want is to be able to replace an entire folder with another one in one command
This doesnt map to any unix command that i know of. mv A B will put A inside of B if B exists and is a directory.
Right. This reminds me how having that command to merge dirs ( and therefore merkle dag nodes) would be so sweet :)
@diasdavid I could pretty easily add ipfs object merge. The underlying code for it is there, right alongside the code for diff (which is now a command). Do you want that?
YES please!
Will it understand how to merge two unixfs dirs and do the sharding correctly?
@whyrusleeping did ipfs object merge ever get created? I'd like to stitch together directories that I don't have stored locally.
Most helpful comment
@diasdavid I could pretty easily add
ipfs object merge. The underlying code for it is there, right alongside the code for diff (which is now a command). Do you want that?