| 225 | } |
| 226 | |
| 227 | u64 StdExplorer::WriteFile(const std::string &path, const void *write_buf, const u64 size) { |
| 228 | if(this->w_file_obj != nullptr) { |
| 229 | return fwrite(write_buf, 1, size, this->w_file_obj); |
| 230 | } |
| 231 | |
| 232 | u64 write_size = 0; |
| 233 | const auto full_path = this->MakeFull(path); |
| 234 | auto f = fopen(full_path.c_str(), "ab+"); |
| 235 | if(f) { |
| 236 | write_size = fwrite(write_buf, 1, size, f); |
| 237 | fclose(f); |
| 238 | } |
| 239 | return write_size; |
| 240 | } |
| 241 | |
| 242 | u64 StdExplorer::GetFileSize(const std::string &path) { |
| 243 | u64 file_size = 0; |
no test coverage detected