example for using as a library
logicminds opened this issue · comments
How would I use go-sync as a library in my app to sync a directory to another directory? Can you provide some examples.
The best example should be the gosync tool (under gosync), although it doesn't implement a full directory sync yet.
There are almost certainly a few things that need checking - truncating file lengths, setting file flags etc.
See: https://github.com/Redundancy/go-sync/blob/master/gosync/patch.go
(and build)
I've made some improvements that should make it considerably easier and cleaner to do this. It's still missing a number of things, but it should be a much saner proposition. See the updated patch.go file.
It's also on my list of things to do in the gosync tool.
Will review