go-sync icon indicating copy to clipboard operation
go-sync copied to clipboard

example for using as a library

Open logicminds opened this issue 10 years ago • 4 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.

logicminds avatar Apr 08 '15 20:04 logicminds

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.

Redundancy avatar Apr 08 '15 22:04 Redundancy

See: https://github.com/Redundancy/go-sync/blob/master/gosync/patch.go (and build)

Redundancy avatar Apr 08 '15 22:04 Redundancy

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.

Redundancy avatar May 31 '15 23:05 Redundancy

Will review

fire avatar Jul 02 '15 05:07 fire