Duplicate directories

From @keskella on Thu Dec 31 2015 06:11:25 GMT+0000 (UTC)

Hi all, I’m wondering what happens to duplicate directories (I’ve got too much stuff to really try this out, I run out of memory real quick). What I do is that I have a staging area where I put the stuff I add to ipfs, and when I’m done with the add I delete and move new files in. I think the directory hashes change, so I’m a bit afraid of the worst case scenario, which is that it overwrites them instead of adding to the same directory object. Again, I’m not lazy, it’s just that I run out memory when I try to operate on my installation. So that’s why I’m asking.

Copied from original issue: https://github.com/ipfs/faq/issues/87

From @Kubuxu on Thu Dec 31 2015 08:31:36 GMT+0000 (UTC)

You can use /ipns/ mountpoint, it requires FUSE and is started with ipfs mount.

Then you should be able to copy files/directories directly to /ipns/local/.

Then you can check what is hash of resulting directory using: ipfs name resolve.

Or you mean something else?

If do you add directories itself or the parent directory? If content of directory is the same then it won’t use extra object storage. Files inside that directory (if it is different) also will be deduped.

From @fazo96 on Thu Dec 31 2015 12:00:15 GMT+0000 (UTC)

at the moment the only way to move stuff to IPFS without duplicating it is using the /ipns/local mountpoint and moving stuff in, like @Kubuxu said. Keep in mind that the current implementation of FUSE (used to create the mountpoint) is quite buggy and you may lose your data!