Write given data to the file handle pointer.
- Parameters
-
| [in] | handle | The file handle. |
| [in] | data_size | How much bytes we want write and move pointer. |
| [in] | data | The data we want write in. |
| [out] | out_bytes_written | How much bytes we written. |
- Returns
- true if file handle is valid and successfully write data.
Definition at line 141 of file FileLibrary.cpp.
142 {
144
145 if (handle->handle)
146 {
147 *out_bytes_written = fwrite(data, 1, data_size, static_cast<FILE*>(handle->handle));
148 if (*out_bytes_written != data_size)
149 {
150 return false;
151 }
152 auto state = fflush(static_cast<FILE*>(handle->handle));
153 return true;
154 }
155 return false;
156 }
#define SPICES_PROFILE_ZONE
References Spices::FileHandle::handle.
Referenced by SpicesTest::TEST(), and Spices::MeshLoader::WriteSASSET().