| 153 | } |
| 154 | |
| 155 | cc_result Stream_WriteAllTo(const cc_string* path, const cc_uint8* data, cc_uint32 length) { |
| 156 | struct Stream stream; |
| 157 | cc_result res, closeRes; |
| 158 | cc_filepath raw_path; |
| 159 | |
| 160 | Platform_EncodePath(&raw_path, path); |
| 161 | res = Stream_CreatePath(&stream, &raw_path); |
| 162 | if (res) return res; |
| 163 | |
| 164 | res = Stream_Write(&stream, data, length); |
| 165 | closeRes = stream.Close(&stream); |
| 166 | return res ? res : closeRes; |
| 167 | } |
| 168 | |
| 169 | void Stream_FromFile(struct Stream* s, cc_file file) { |
| 170 | Stream_Init(s); |
no test coverage detected