| 323 | |
| 324 | template<> |
| 325 | bool xwrite<std::string>(int fd, const std::string& data) { |
| 326 | uint64_t size = data.size(); |
| 327 | if (write(fd, &size, sizeof(size)) != sizeof(size)) { |
| 328 | return false; |
| 329 | } |
| 330 | if (write(fd, data.data(), size) != static_cast<ssize_t>(size)) { |
| 331 | return false; |
| 332 | } |
| 333 | return true; |
| 334 | } |
| 335 | |
| 336 | bool xwrite(int fd, const char* data) { |
| 337 | if (!data) return false; |
nothing calls this directly
no outgoing calls
no test coverage detected