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

Function isAbs

cli/command/container/cp.go:526–528  ·  view source on GitHub ↗

IsAbs is a platform-agnostic wrapper for filepath.IsAbs. On Windows, golang filepath.IsAbs does not consider a path \windows\system32 as absolute as it doesn't start with a drive-letter/colon combination. However, in docker we need to verify things such as WORKDIR /windows/system32 in a Dockerfile

(path string)

Source from the content-addressed store, hash-verified

524// by the daemon). This SHOULD be treated as absolute from a docker processing
525// perspective.
526func isAbs(path string) bool {
527 return filepath.IsAbs(path) || strings.HasPrefix(path, string(os.PathSeparator))
528}

Callers 3

copyFromContainerFunction · 0.70
copyToContainerFunction · 0.70
splitCpArgFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…