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

Function NoFileExists

internal/testify/assert/assertions.go:1709–1721  ·  view source on GitHub ↗

NoFileExists checks whether a file does not exist in a given path. It fails if the path points to an existing _file_ only.

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

Source from the content-addressed store, hash-verified

1707// NoFileExists checks whether a file does not exist in a given path. It fails
1708// if the path points to an existing _file_ only.
1709func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
1710 if h, ok := t.(tHelper); ok {
1711 h.Helper()
1712 }
1713 info, err := os.Lstat(path)
1714 if err != nil {
1715 return true
1716 }
1717 if info.IsDir() {
1718 return true
1719 }
1720 return Fail(t, fmt.Sprintf("file %q exists", path), msgAndArgs...)
1721}
1722
1723// DirExists checks whether a directory exists in the given path. It also fails
1724// if the path is a file rather a directory or there is an error checking whether it exists.

Callers 4

NoFileExistsFunction · 0.92
NoFileExistsfFunction · 0.70
TestNoFileExistsFunction · 0.70
NoFileExistsMethod · 0.70

Calls 3

SprintfMethod · 0.80
FailFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestNoFileExistsFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…