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{})
| 584 | // FileExists checks whether a file exists in the given path. It also fails if |
| 585 | // the path points to a directory or there is an error when trying to check the file. |
| 586 | func FileExists(t TestingT, path string, msgAndArgs ...interface{}) { |
| 587 | if h, ok := t.(tHelper); ok { |
| 588 | h.Helper() |
| 589 | } |
| 590 | if assert.FileExists(t, path, msgAndArgs...) { |
| 591 | return |
| 592 | } |
| 593 | t.FailNow() |
| 594 | } |
| 595 | |
| 596 | // FileExistsf checks whether a file exists in the given path. It also fails if |
| 597 | // the path points to a directory or there is an error when trying to check the file. |
no test coverage detected