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

Function stat

cli/command/telemetry_docker.go:224–236  ·  view source on GitHub ↗
(p string, f fs.FS)

Source from the content-addressed store, hash-verified

222}
223
224func stat(p string, f fs.FS) (fs.FileInfo, error) {
225 if f, ok := f.(fs.StatFS); ok {
226 return f.Stat(p)
227 }
228
229 file, err := f.Open(p)
230 if err != nil {
231 return nil, err
232 }
233
234 defer file.Close()
235 return file.Stat()
236}
237
238func isWsl() bool {
239 return os.Getenv("WSL_DISTRO_NAME") != ""

Callers 1

wslSocketPathFunction · 0.85

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…