|
Gromacs
2023.4
|
#include <testutils/include/testutils/testfileredirector.h>
Inheritance diagram for gmx::test::TestFileInputRedirector:
Collaboration diagram for gmx::test::TestFileInputRedirector:In-memory implementation for IFileInputRedirector for tests.
By default, this implementation will return false for all file existence checks. To return true for a specific path, use addExistingFile().
Public Member Functions | |
| void | addExistingFile (const std::filesystem::path &filename) |
| Marks the provided path as an existing file. More... | |
| bool | fileExists (const std::filesystem::path &filename, const File::NotFoundHandler &onNotFound) const override |
| Checks whether the provided path exists (and is a file). More... | |
| void gmx::test::TestFileInputRedirector::addExistingFile | ( | const std::filesystem::path & | filename | ) |
Marks the provided path as an existing file.
| std::bad_alloc | if out of memory. |
Further checks for existence of the given path will return true.
|
overridevirtual |
Checks whether the provided path exists (and is a file).
The onNotFound can be used to influence the behavior on error conditions. Functions to pass as this parameter are provided as members of gmx::File.
Implements gmx::IFileInputRedirector.
1.8.5