MCPcopy Index your code
hub / github.com/peak/s5cmd / SizeAndModificationStrategy

Struct SizeAndModificationStrategy

command/sync_strategy.go:39–39  ·  view source on GitHub ↗

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:

Source from the content-addressed store, hash-verified

37// time: src <= dst size: src != dst should sync: yes
38// time: src <= dst size: src == dst should sync: no
39type SizeAndModificationStrategy struct{}
40
41func (sm *SizeAndModificationStrategy) ShouldSync(srcObj, dstObj *storage.Object) error {
42 srcMod, dstMod := srcObj.ModTime, dstObj.ModTime

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected