TheDiscordian / ipfs-sync

A simple daemon which will watch files on your filesystem, mirror them to MFS, automatically update related pins, and update related IPNS keys.
BSD 3-Clause "New" or "Revised" License
95 stars 14 forks source link

"Add to parent" type feature #24

Open TheDiscordian opened 3 years ago

TheDiscordian commented 3 years ago

Rome Silvanus in a chat room has asked for a feature like so:

Upon adding a directory, add it to the parent in MFS, not just the root. So /home/user/dir1/dir2, when added, would create a dir in mfs like /ipfs-sync/dir1/dir2, but ONLY sync dir2's data, retaining dir1 as the parent directory. This way people can simply do things like adding select directories out of something like Google Drive, and having the same tree accessible, with non-shared directories omitted.

Currently this can be solved with symlinks on the FS itself. Is there any interest in this feature?

TheDiscordian commented 3 years ago

AddToParent could be the flag added for each dir that wants to be added to the parent dir in MFS.

TheDiscordian commented 3 years ago

For this feature to be stable, it should expect users to enable/disable this after sync, so we'll need to ensure the MFS is setup correctly upon change.

RomeSilvanus commented 3 years ago

I want to add to this. My main motivation is to be able to add one big folder, basically in chunks, by adding the individual subfolders in the config file. This way ipfs-sync can finish adding one folder after the other and it will be reachable over IPFS without the need to wait hash over the whole big root directory first.

It'll still take ages for my data set, but at least it's faster than the alternative.