MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / TempFile

Method TempFile

Bcore/src/main/cpp/Dobby/tests/catch.hpp:8102–8113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8100
8101#if defined(_MSC_VER)
8102TempFile::TempFile() {
8103 if (tmpnam_s(m_buffer)) {
8104 throw std::runtime_error("Could not get a temp filename");
8105 }
8106 if (fopen_s(&m_file, m_buffer, "w")) {
8107 char buffer[100];
8108 if (strerror_s(buffer, errno)) {
8109 throw std::runtime_error("Could not translate errno to string");
8110 }
8111 throw std::runtime_error("Could not open the temp file: " + std::string(m_buffer) + buffer);
8112 }
8113}
8114#else
8115TempFile::TempFile() {
8116 m_file = std::tmpfile();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected