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{})
| 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. |
| 573 | func 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. |
no test coverage detected
searching dependent graphs…