SizeAndModificationStrategy determines to sync based on objects' both sizes and modification times. It treats source object as the source-of-truth; time: src > dst size: src != dst should sync: yes time: src > dst size: src == dst should sync: yes time: src <= dst size:
| 37 | // time: src <= dst size: src != dst should sync: yes |
| 38 | // time: src <= dst size: src == dst should sync: no |
| 39 | type SizeAndModificationStrategy struct{} |
| 40 | |
| 41 | func (sm *SizeAndModificationStrategy) ShouldSync(srcObj, dstObj *storage.Object) error { |
| 42 | srcMod, dstMod := srcObj.ModTime, dstObj.ModTime |
nothing calls this directly
no outgoing calls
no test coverage detected