| 109 | } |
| 110 | |
| 111 | std::shared_ptr<Data> ReadFile(const std::string& path) { |
| 112 | auto stream = Stream::MakeFromFile(ProjectPath::Absolute(path)); |
| 113 | if (stream == nullptr) { |
| 114 | return nullptr; |
| 115 | } |
| 116 | Buffer buffer(stream->size()); |
| 117 | stream->read(buffer.data(), buffer.size()); |
| 118 | return buffer.release(); |
| 119 | } |
| 120 | |
| 121 | void SaveFile(std::shared_ptr<Data> data, const std::string& key) { |
| 122 | std::filesystem::path path = OUT_ROOT + "/" + key; |