FastLED 3.9.15
Loading...
Searching...
No Matches

◆ write()

fstream & fl::fstream::write ( const char * data,
fl::size_t count )

Definition at line 286 of file fstream.cpp.hpp.

286 {
287 if (mHandle && mHandle->is_open()) {
288 fl::size_t written = mHandle->write(data, count);
289 if (written != count) {
290 mFail = true;
291 mGood = false;
292 }
293 updateState();
294 } else {
295 // Writing to closed stream - set bad file error
297 mFail = true;
298 mGood = false;
299 }
300 return *this;
301}
bool mGood
Definition fstream.h:303
void updateState()
Definition fstream.h:308
filebuf_ptr mHandle
Definition fstream.h:301
bool mFail
Definition fstream.h:305
int mLocalError
Definition fstream.h:306
__SIZE_TYPE__ size_t
Definition s16x16x4.h:16
constexpr int err_bad_file
Definition file_io.h:45

References fstream(), fl::io::err_bad_file, mFail, mGood, mHandle, mLocalError, and updateState().

+ Here is the call graph for this function: