FastLED 3.10.8
Loading...
Searching...
No Matches

◆ write()

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

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

169 {
170 if (mHandle && mHandle->is_open()) {
171 fl::size_t written = mHandle->write(data, count);
172 if (written != count) {
173 mFail = true;
174 mGood = false;
175 }
176 updateState();
177 } else {
178 // Writing to closed stream - set bad file error
180 mFail = true;
181 mGood = false;
182 }
183 return *this;
184}
void updateState() FL_NO_EXCEPT
Definition fstream.h:215
int mLocalError
Definition fstream.h:213
filebuf_ptr mHandle
Definition fstream.h:209
__SIZE_TYPE__ size_t
Definition s16x16x4.h:16
constexpr int err_bad_file
Definition file_io.h:48

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

+ Here is the call graph for this function: