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

Function checkVersinoningURLRemote

command/validation.go:20–25  ·  view source on GitHub ↗

checkVersinoningURLRemote checks if the versioning related flags are used with local objects. Because the versioning is only supported with s3.

(url *url.URL)

Source from the content-addressed store, hash-verified

18// checkVersinoningURLRemote checks if the versioning related flags are used with
19// local objects. Because the versioning is only supported with s3.
20func checkVersinoningURLRemote(url *url.URL) error {
21 if !url.IsRemote() && url.IsVersioned() {
22 return fmt.Errorf("%q, and %q flags can only be used with remote objects", allVersionsFlagName, versionIDFlagName)
23 }
24 return nil
25}
26
27// checkVersioningFlagCompatibility checks if the incompatible versioning flags
28// are used together. Because it is not allowed to refer to both "all versions" and

Callers 5

validateCopyCommandFunction · 0.85
validateHeadCommandFunction · 0.85
newURLsFunction · 0.85
validateLSCommandFunction · 0.85
validateDUCommandFunction · 0.85

Calls 2

IsRemoteMethod · 0.80
IsVersionedMethod · 0.80

Tested by

no test coverage detected