MCPcopy Create free account
hub / github.com/docker/cli / isAbs

Function isAbs

cli/compose/loader/windows_path.go:17–27  ·  view source on GitHub ↗

isAbs reports whether the path is a Windows absolute path.

(path string)

Source from the content-addressed store, hash-verified

15
16// isAbs reports whether the path is a Windows absolute path.
17func isAbs(path string) (b bool) {
18 l := volumeNameLen(path)
19 if l == 0 {
20 return false
21 }
22 path = path[l:]
23 if path == "" {
24 return false
25 }
26 return isSlash(path[0])
27}
28
29// volumeNameLen returns length of the leading volume name on Windows.
30// It returns 0 elsewhere.

Callers 2

resolveVolumePathsFunction · 0.70
TestIsAbsFunction · 0.70

Calls 2

volumeNameLenFunction · 0.85
isSlashFunction · 0.85

Tested by 1

TestIsAbsFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…