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

◆ read() [1/3]

fl::size_t fl::detail::posix_filebuf::read ( char * buffer,
fl::size_t count )
overridevirtual

Implements fl::filebuf.

Definition at line 79 of file file_handle.cpp.hpp.

79 {
80 if (!mFile) {
81 return 0;
82 }
83 fl::size_t bytes_read = fl::fread(buffer, 1, count, mFile);
84
85 // fread can return short at EOF - not an error
86 if (fl::feof(mFile) || bytes_read > 0) {
87 mLastError = 0;
88 } else if (fl::ferror(mFile)) {
90 }
91
92 return bytes_read;
93}
__SIZE_TYPE__ size_t
Definition s16x16x4.h:16
int ferror(FILE *file)
Check for file error.
Definition file_io.h:289
fl::size_t fread(void *buffer, fl::size_t size, fl::size_t count, FILE *file)
Read from file.
Definition file_io.h:254
int feof(FILE *file)
Check for end-of-file.
Definition file_io.h:279

References captureError(), fl::feof(), fl::ferror(), fl::fread(), mFile, and mLastError.

Referenced by operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: