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

Method shouldSkipSrcObject

command/sync.go:553–573  ·  view source on GitHub ↗

shouldSkipObject checks is object should be skipped.

(object *storage.Object, verbose bool)

Source from the content-addressed store, hash-verified

551
552// shouldSkipObject checks is object should be skipped.
553func (s Sync) shouldSkipSrcObject(object *storage.Object, verbose bool) bool {
554 if object.Type.IsDir() || errorpkg.IsCancelation(object.Err) {
555 return true
556 }
557
558 if err := object.Err; err != nil {
559 if verbose {
560 printError(s.fullCommand, s.op, err)
561 }
562 return true
563 }
564
565 if object.StorageClass.IsGlacier() {
566 if verbose {
567 err := fmt.Errorf("object '%v' is on Glacier storage", object)
568 printError(s.fullCommand, s.op, err)
569 }
570 return true
571 }
572 return false
573}
574
575func (s Sync) shouldSkipDstObject(object *storage.Object, verbose bool) bool {
576 if object.Type.IsDir() || errorpkg.IsCancelation(object.Err) {

Callers 1

Calls 3

printErrorFunction · 0.85
IsDirMethod · 0.80
IsGlacierMethod · 0.80

Tested by

no test coverage detected