#include #include #include #include namespace Io { void FileWriter::Write(const std::string& path, const std::vector& data) { std::ofstream f(NativePath(path), std::ios::binary); if (!f) throw Domain::RelinkerException("Cannot open output file: " + path); f.write(reinterpret_cast(data.data()), static_cast(data.size())); f.close(); if (!f) throw Domain::RelinkerException("Failed to write file: " + path); } void FileWriter::Write(const std::string& path, const std::string& content) { std::ofstream f(NativePath(path)); if (!f) throw Domain::RelinkerException("Cannot open output file: " + path); f << content; f.close(); if (!f) throw Domain::RelinkerException("Failed to write file: " + path); } }