| 1744 | } |
| 1745 | |
| 1746 | size_t writeFile(const DataBuf& buf, const std::string& path) { |
| 1747 | FileIo file(path); |
| 1748 | if (file.open("wb") != 0) { |
| 1749 | throw Error(ErrorCode::kerFileOpenFailed, path, "wb", strError()); |
| 1750 | } |
| 1751 | return file.write(buf.c_data(), buf.size()); |
| 1752 | } |
| 1753 | #endif |
| 1754 | |
| 1755 | #ifdef EXV_USE_CURL |