MCPcopy Create free account
hub / github.com/dropbox/dbxcli / actionForExistingDestination

Function actionForExistingDestination

cmd/put.go:619–628  ·  view source on GitHub ↗
(dst string, ifExists string, metadata files.IsMetadata)

Source from the content-addressed store, hash-verified

617}
618
619func actionForExistingDestination(dst string, ifExists string, metadata files.IsMetadata) (putDestinationAction, files.IsMetadata, error) {
620 switch ifExists {
621 case putIfExistsSkip:
622 return putDestinationSkip, metadata, nil
623 case putIfExistsFail:
624 return putDestinationUpload, nil, pathConflictErrorWithPath(dst, "destination %q already exists", dst)
625 default:
626 return putDestinationUpload, nil, nil
627 }
628}
629
630func getDestinationMetadata(dbx filesClient, dst string) (files.IsMetadata, bool, error) {
631 meta, err := dbx.GetMetadataContext(currentContext(), files.NewGetMetadataArg(dst))

Callers 2

checkPutStdinDestinationFunction · 0.85
checkPutDestinationFunction · 0.85

Calls 1

Tested by

no test coverage detected