MCPcopy Index your code
hub / github.com/expr-lang/expr / FileExists

Function FileExists

internal/testify/require/require.go:573–581  ·  view source on GitHub ↗

FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.

(t TestingT, path string, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

571// FileExists checks whether a file exists in the given path. It also fails if
572// the path points to a directory or there is an error when trying to check the file.
573func FileExists(t TestingT, path string, msgAndArgs ...interface{}) {
574 if h, ok := t.(tHelper); ok {
575 h.Helper()
576 }
577 if assert.FileExists(t, path, msgAndArgs...) {
578 return
579 }
580 t.FailNow()
581}
582
583// FileExistsf checks whether a file exists in the given path. It also fails if
584// the path points to a directory or there is an error when trying to check the file.

Callers 1

FileExistsMethod · 0.70

Calls 3

FileExistsFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…