Definition at line 167 of file file_system.cpp.
167 {
168 FileHandlePtr file =
openRead(path);
169 if (!file) {
171 return false;
172 }
173 size_t size = file->size();
175 bool wrote = false;
176 while (file->available()) {
177 uint8_t buf[64];
178 size_t n = file->read(buf, sizeof(buf));
179
180 out->
append((
const char*)buf, n);
181 wrote = true;
182 }
183 file->close();
184 FASTLED_DBG_IF(!wrote,
"Failed to write any data to the output string.");
185 return wrote;
186}
FileHandlePtr openRead(const char *path)
Str & append(const char *str)
void reserve(size_t newCapacity)
#define FASTLED_DBG_IF(COND, MSG)
References fl::Str::append(), FASTLED_DBG_IF, FASTLED_WARN, openRead(), fl::StrN< SIZE >::reserve(), and fl::StrN< SIZE >::size().
Referenced by readJson(), readScreenMap(), and readScreenMaps().