MCPcopy
hub / github.com/kptdev/kpt / Exists

Function Exists

internal/cmdexport/pathutil/pathutil.go:47–51  ·  view source on GitHub ↗

Exists returns true only if path exists and is accessible.

(path string)

Source from the content-addressed store, hash-verified

45
46// Exists returns true only if path exists and is accessible.
47func Exists(path string) bool {
48 _, err := os.Stat(path)
49
50 return !os.IsNotExist(err)
51}
52
53// IsInsideDir checks if path is within directory.
54// Both path and directory have to be absolute paths.

Callers 1

TestExistsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestExistsFunction · 0.68