Definition at line 165 of file file_system.cpp.
165 {
166 FileHandlePtr file =
openRead(path);
167 if (!file) {
169 return false;
170 }
171 size_t size = file->size();
173 bool wrote = false;
174 while (file->available()) {
175 uint8_t buf[64];
176 size_t n = file->read(buf, sizeof(buf));
177
178 out->
append((
const char *)buf, n);
179 wrote = true;
180 }
181 file->close();
182 FASTLED_DBG_IF(!wrote,
"Failed to write any data to the output string.");
183 return wrote;
184}
FileHandlePtr openRead(const char *path)
Str & append(const T &val)
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().