MCPcopy Index your code
hub / github.com/docker/cli / ValidateOutputPathFileMode

Function ValidateOutputPathFileMode

cli/command/utils.go:89–97  ·  view source on GitHub ↗

ValidateOutputPathFileMode validates the output paths of the "docker cp" command and serves as a helper to [ValidateOutputPath]

(fileMode os.FileMode)

Source from the content-addressed store, hash-verified

87// ValidateOutputPathFileMode validates the output paths of the "docker cp" command
88// and serves as a helper to [ValidateOutputPath]
89func ValidateOutputPathFileMode(fileMode os.FileMode) error {
90 switch {
91 case fileMode&os.ModeDevice != 0:
92 return errors.New("got a device")
93 case fileMode&os.ModeIrregular != 0:
94 return errors.New("got an irregular file")
95 }
96 return nil
97}
98
99func invalidParameter(err error) error {
100 return invalidParameterErr{err}

Callers 1

ValidateOutputPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…