MCPcopy Index your code
hub / github.com/git/git / write_file_buf

Function write_file_buf

wrapper.c:682–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680}
681
682void write_file_buf(const char *path, const char *buf, size_t len)
683{
684 int fd = xopen(path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
685 if (write_in_full(fd, buf, len) < 0)
686 die_errno(_("could not write to '%s'"), path);
687 if (close(fd))
688 die_errno(_("could not close '%s'"), path);
689}
690
691void write_file(const char *path, const char *fmt, ...)
692{

Calls 3

xopenFunction · 0.85
write_in_fullFunction · 0.85
die_errnoFunction · 0.85