DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
(t TestingT, path string, msgAndArgs ...interface{})
| 67 | // DirExists checks whether a directory exists in the given path. It also fails |
| 68 | // if the path is a file rather a directory or there is an error checking whether it exists. |
| 69 | func DirExists(t TestingT, path string, msgAndArgs ...interface{}) { |
| 70 | if h, ok := t.(tHelper); ok { |
| 71 | h.Helper() |
| 72 | } |
| 73 | if assert.DirExists(t, path, msgAndArgs...) { |
| 74 | return |
| 75 | } |
| 76 | t.FailNow() |
| 77 | } |
| 78 | |
| 79 | // DirExistsf checks whether a directory exists in the given path. It also fails |
| 80 | // if the path is a file rather a directory or there is an error checking whether it exists. |