| 21 | class TestFileGuard { |
| 22 | public: |
| 23 | TestFileGuard(const string &filename, const string &content) : file_path(TestCreatePath(filename)) { |
| 24 | auto local_fs = FileSystem::CreateLocal(); |
| 25 | auto handle = local_fs->OpenFile(file_path, FileFlags::FILE_FLAGS_WRITE | FileFlags::FILE_FLAGS_FILE_CREATE); |
| 26 | handle->Write(QueryContext(), const_cast<char *>(content.data()), content.size(), 0); |
| 27 | handle->Sync(); |
| 28 | } |
| 29 | |
| 30 | ~TestFileGuard() { |
| 31 | auto local_fs = FileSystem::CreateLocal(); |
nothing calls this directly
no test coverage detected