Read one line from the current file handle pointer, and move pointer the same size.
- Parameters
-
| [in] | handle | The file handle. |
| [in] | max_length | Defines the max size per line. |
| [out] | line_buf | The data of one line. |
| [out] | out_line_length | How much bytes we read. |
- Returns
- true if file handle is valid and successfully read data.
Definition at line 108 of file FileLibrary.cpp.
109 {
111
112 if (handle->handle && line_buf && out_line_length && max_length > 0)
113 {
114 if (fgets(line_buf, static_cast<int>(max_length), static_cast<FILE*>(handle->handle)) != nullptr)
115 {
116 *out_line_length = strlen(line_buf);
117 return true;
118 }
119 }
120 return false;
121 }
#define SPICES_PROFILE_ZONE
References Spices::FileHandle::handle.
Referenced by SpicesTest::TEST().