syncrypt / client

Syncrypt command line client and sync daemon
https://syncrypt.space
GNU General Public License v3.0
11 stars 1 forks source link

Add file remove and rename command #30

Open lordi opened 7 years ago

lordi commented 7 years ago

There should be two commands (remove and rename) to allow the user to explicitly handle file changes.

bakkdoor commented 6 years ago

What do you think of these changes to the protocol?

Rename a file

{:rename, old_hash, new_hash}
-> {:ok} | {:error, reason}

I'm not sure how we want to deal with renaming a file.. Do we end up changing all revisions and pretend they all were for a file with the new hash? Not sure if that even works with the current way we encrypt files. I'd assume we'd need to at least re-upload the metadata along with the new hash for the encryption to work out?

Delete a file (and all its revisions)

{:delete_file hash}
-> {:ok} | {:error, reason}
lordi commented 6 years ago

As for renaming, thats a good question. I think intuitively I'm against just renaming all revisions, but it has alot of benefits (eg. the history of the file is retained).

We indeed need to re-upload the metadata because the filename inside of it changed obviously.

lordi commented 6 years ago

Delete file is implemented in Branch sign-chain.