MCPcopy Create free account
hub / github.com/fmtlib/fmt / write

Method write

src/os.cc:280–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280auto file::write(const void* buffer, size_t count) -> size_t {
281 rwresult result = 0;
282 FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
283 if (result < 0)
284 FMT_THROW(system_error(errno, FMT_STRING("cannot write to file")));
285 return detail::to_unsigned(result);
286}
287
288auto file::dup(int fd) -> file {
289 // Don't retry as dup doesn't return EINTR.

Callers 1

release.pyFile · 0.45

Calls 4

convert_rwcountFunction · 0.85
system_errorFunction · 0.85
to_unsignedFunction · 0.85
writeFunction · 0.50

Tested by

no test coverage detected