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

Function NoDirExists

internal/testify/assert/assertions.go:1744–1759  ·  view source on GitHub ↗

NoDirExists checks whether a directory does not exist in the given path. It fails if the path points to an existing _directory_ only.

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

Source from the content-addressed store, hash-verified

1742// NoDirExists checks whether a directory does not exist in the given path.
1743// It fails if the path points to an existing _directory_ only.
1744func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool {
1745 if h, ok := t.(tHelper); ok {
1746 h.Helper()
1747 }
1748 info, err := os.Lstat(path)
1749 if err != nil {
1750 if os.IsNotExist(err) {
1751 return true
1752 }
1753 return true
1754 }
1755 if !info.IsDir() {
1756 return true
1757 }
1758 return Fail(t, fmt.Sprintf("directory %q exists", path), msgAndArgs...)
1759}
1760
1761// JSONEq asserts that two JSON strings are equivalent.
1762//

Callers 4

NoDirExistsFunction · 0.92
NoDirExistsfFunction · 0.70
TestNoDirExistsFunction · 0.70
NoDirExistsMethod · 0.70

Calls 3

SprintfMethod · 0.80
FailFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestNoDirExistsFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…