|A while back I posted questions about this, then walked away. Now I'm considering going back at it again.
The basic idea was to use an enhancement of FileSystemWatcher that I found here (I think it was this one) that solves some issues like multiple events firing for the same file/folder. It works really well and that's not my question.
The big issues I ran into are:
I tried to do some file locking as soon as the sync starts, but it's tricky to get the timing right.
- How to handle multiple versions of the same file being dropped into the watch folder on different PC's at the same time. With latency, I guess I could always take the last file, but it's still a concern.
- How to deal with a file or folder being deleted or edited during a sync. Example, user creates a file/folder, the the sync starts, then as it's syncing, deletes it? or opens it with some app?
The summary of this is, what's the right way to manage files & folders like DropBox does regardless of what's happening to a file or folder?
I'd appreciate some insight.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.