MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / write

Method write

3ds/source/fsstream.cpp:155–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155u32 FSStream::write(const void* buf, u32 sz)
156{
157 u32 wt = 0;
158 if (isPxi()) {
159 // PXI has no flush-on-close; keep the per-write flush for the single GBA save file.
160 mResult = FSPXI_WriteFile(FsPxiHandle, std::get<FSPXI_File>(mHandle), &wt, mOffset, buf, sz, FS_WRITE_FLUSH);
161 }
162 else {
163 // Skip the per-write flush; close() flushes once. Avoids a flush per 16 KB chunk and per tiny header write.
164 mResult = FSFILE_Write(std::get<Handle>(mHandle), &wt, mOffset, buf, sz, 0);
165 }
166 mOffset += wt;
167 return wt;
168}
169
170bool FSStream::eof(void)
171{

Callers 11

writeFileMethod · 0.45
handleUploadFunction · 0.45
exportTitleListCacheMethod · 0.45
isCacheFreshMethod · 0.45
backupMethod · 0.45
restoreMethod · 0.45
copyFileMethod · 0.45
backupMethod · 0.45
streamBodyToFileFunction · 0.45
savWriteMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected