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

Function normalizeRelocationIfExists

cmd/relocation_if_exists.go:38–47  ·  view source on GitHub ↗
(ifExists string)

Source from the content-addressed store, hash-verified

36}
37
38func normalizeRelocationIfExists(ifExists string) (string, error) {
39 switch ifExists {
40 case "", relocationIfExistsFail:
41 return relocationIfExistsFail, nil
42 case relocationIfExistsSkip:
43 return relocationIfExistsSkip, nil
44 default:
45 return "", invalidArgumentsErrorfWithDetails("invalid --if-exists %q (use fail or skip)", flagValueErrorDetails("if-exists", ifExists), ifExists)
46 }
47}
48
49func relocationSkipIfDestinationExists(dbx filesClient, arg *files.RelocationArg, opts relocationOptions) (relocationResult, bool, error) {
50 if opts.ifExists != relocationIfExistsSkip {

Callers 1

parseRelocationIfExistsFunction · 0.85

Calls 2

flagValueErrorDetailsFunction · 0.85

Tested by

no test coverage detected