MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / WriteFile

Method WriteFile

Goldleaf/source/fs/fs_StdExplorer.cpp:227–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 10

DecryptCopyNax0ToNcaFunction · 0.45
ExportTicketCertFunction · 0.45
ExportAsVirtualAmiiboFunction · 0.45
GenerateFromFunction · 0.45
SaveTicketFunction · 0.45
CopyFileMethod · 0.45
CopyFileProgressMethod · 0.45
SaveFileMethod · 0.45
EditUserIconFunction · 0.45
ExportSelectedUserIconFunction · 0.45

Calls 1

MakeFullMethod · 0.80

Tested by

no test coverage detected