3 #include "ScopeHelpers.h"
5 bool WriteWholeFile(const char *path
, const void *content
, size_t length
, unsigned int mode
)
7 FDScope
fd(path
, O_RDWR
| O_CREAT
| O_TRUNC
, mode
);
11 return WriteAll(fd
, content
, length
, 0x100000) == length
;
14 bool WriteWholeFile(const char *path
, const std::string
&content
, unsigned int mode
)
16 return WriteWholeFile(path
, content
.data(), content
.size(), mode
);