72 FL_WARN(
"NullFileSystem instantiated as a placeholder, please "
73 "implement a file system for your platform.");
97 mFs = platform_filesystem;
125 return !doc->is_null();
132 FL_WARN(
"Failed to read file: " << path);
134 *error =
"Failed to read file: ";
153 FL_WARN(
"Failed to read file: " << path);
155 *error =
"Failed to read file: ";
181 Video video(pixelsPerFrame, fps, nFrameHistory);
194 FL_WARN(
"Failed to open file: " << path);
197 fl::size size = file.
size();
198 out->reserve(size + out->size());
202 fl::size n = file.
read(buf,
sizeof(buf));
203 out->append((
const char *)buf, n);
207 FL_DBG_IF(!wrote,
"Failed to write any data to the output string.");
221 *error_message =
"Failed to initialize SD card on CS pin ";
222 error_message->append(
static_cast<fl::u32
>(cs_pin));
226 return fs.
loadJpeg(filepath, config, error_message);
Video openVideo(const char *path, fl::size pixelsPerFrame, float fps=30.0f, fl::size nFrameHistory=0) FL_NO_EXCEPT
bool beginSd(int cs_pin) FL_NO_EXCEPT
fl::ifstream openRead(const char *path) FL_NO_EXCEPT
bool readScreenMap(const char *path, const char *name, ScreenMap *out, string *error=nullptr) FL_NO_EXCEPT
bool readScreenMaps(const char *path, fl::flat_map< string, ScreenMap > *out, string *error=nullptr) FL_NO_EXCEPT
bool begin(FsImplPtr platform_filesystem) FL_NO_EXCEPT
FramePtr loadJpeg(const char *path, const JpegConfig &config=JpegConfig(), fl::string *error_message=nullptr) FL_NO_EXCEPT
FileSystem() FL_NO_EXCEPT
fl::Fled loadFled(const char *path) FL_NO_EXCEPT
bool readJson(const char *path, json *doc) FL_NO_EXCEPT
bool readText(const char *path, string *out) FL_NO_EXCEPT
static Fled load(FileSystem &fs, const char *path) FL_NO_EXCEPT
FsImpl() FL_NO_EXCEPT=default
bool has_error() const FL_NO_EXCEPT override
fl::size_t size() const FL_NO_EXCEPT override
bool is_eof() const FL_NO_EXCEPT override
void clear_error() FL_NO_EXCEPT override
fl::size_t read(char *dst, fl::size_t bytesToRead) FL_NO_EXCEPT override
bool seek(fl::size_t pos, seek_dir dir) FL_NO_EXCEPT override
bool is_open() const FL_NO_EXCEPT override
void close() FL_NO_EXCEPT override
fl::size_t tell() FL_NO_EXCEPT override
const char * error_message() const FL_NO_EXCEPT override
NullFileHandle() FL_NO_EXCEPT=default
int error_code() const FL_NO_EXCEPT override
const char * path() const FL_NO_EXCEPT override
fl::size_t write(const char *data, fl::size_t count) FL_NO_EXCEPT override
NullFileSystem() FL_NO_EXCEPT
void end() FL_NO_EXCEPT override
Unmount. Must be safe to call on a backend that never mounted.
filebuf_ptr openRead(const char *_path) FL_NO_EXCEPT override
Null handle if the file does not exist or cannot be opened.
bool begin() FL_NO_EXCEPT override
Mount. False if the medium is absent, unformatted, or unreadable.
~NullFileSystem() FL_NO_EXCEPT override
static bool ParseJson(const char *jsonStrScreenMap, fl::flat_map< string, ScreenMap > *segmentMaps, string *err=nullptr) FL_NO_EXCEPT
const char * c_str() const FL_NO_EXCEPT
virtual bool seek(fl::size_t pos, seek_dir dir) FL_NO_EXCEPT=0
fl::size_t pos() const FL_NO_EXCEPT
fl::size_t size() const FL_NO_EXCEPT
ifstream & read(char *buffer, fl::size_t count) FL_NO_EXCEPT
bool available() const FL_NO_EXCEPT
bool is_open() const FL_NO_EXCEPT
filebuf_ptr rdbuf() const FL_NO_EXCEPT
void close() FL_NO_EXCEPT
static json parse(const fl::string &txt) FL_NO_EXCEPT
FastLED's Elegant JSON Library: fl::json
Centralized logging categories for FastLED hardware interfaces and subsystems.
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
FramePtr loadJpegFromSD(int cs_pin, const char *filepath, const JpegConfig &config, fl::string *error_message) FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
fl::shared_ptr< filebuf > filebuf_ptr
bool readText(FileSystem &fs, const char *path, string *out) FL_NO_EXCEPT
Whole file as text.
Base definition for an LED controller.
#define FASTLED_UNUSED(x)