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

Function wslSocketPath

cli/command/telemetry_docker.go:164–171  ·  view source on GitHub ↗

wslSocketPath will convert the referenced URL to a WSL-compatible path and check if that path exists. If the path exists, it will be returned.

(s string, f fs.FS)

Source from the content-addressed store, hash-verified

162// path and check if that path exists. If the path exists, it will
163// be returned.
164func wslSocketPath(s string, f fs.FS) string {
165 if p := toWslPath(s); p != "" {
166 if _, err := stat(p, f); err == nil {
167 return "/" + p
168 }
169 }
170 return ""
171}
172
173// toWslPath converts the referenced URL to a WSL-compatible
174// path if this looks like a Windows absolute path.

Callers 2

unixSocketEndpointFunction · 0.85
TestWslSocketPathFunction · 0.85

Calls 2

toWslPathFunction · 0.85
statFunction · 0.85

Tested by 1

TestWslSocketPathFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…