41 bool is_open()
const override {
return false; }
54 const char *
path()
const override {
return "nullptr filebuf"; }
62 bool is_eof()
const override {
return true; }
72 FL_WARN(
"NullFileSystem instantiated as a placeholder, please "
73 "implement a file system for your platform.");
77 bool begin()
override {
return true; }
78 void end()
override {}
97 mFs = platform_filesystem;
132 FL_WARN(
"Failed to read file: %s", path);
134 *error =
"Failed to read file: ";
153 FL_WARN(
"Failed to read file: %s", path);
155 *error =
"Failed to read file: ";
180 fl::size nFrameHistory) {
181 Video video(pixelsPerFrame, fps, nFrameHistory);
194 FL_WARN(
"Failed to open file: %s", path);
197 fl::size size = file.
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);
bool readText(const char *path, string *out)
bool beginSd(int cs_pin) FL_NO_EXCEPT
bool readJson(const char *path, json *doc)
fl::ifstream openRead(const char *path)
bool readScreenMap(const char *path, const char *name, ScreenMap *out, string *error=nullptr)
bool begin(FsImplPtr platform_filesystem)
Video openVideo(const char *path, fl::size pixelsPerFrame, float fps=30.0f, fl::size nFrameHistory=0)
FramePtr loadJpeg(const char *path, const JpegConfig &config=JpegConfig(), fl::string *error_message=nullptr)
bool readScreenMaps(const char *path, fl::flat_map< string, ScreenMap > *out, string *error=nullptr)
FileSystem() FL_NO_EXCEPT
fl::Fled loadFled(const char *path) FL_NO_EXCEPT
static Fled load(FileSystem &fs, const char *path) FL_NO_EXCEPT
FsImpl() FL_NO_EXCEPT=default
int error_code() const override
const char * path() const override
bool is_eof() const override
fl::size_t tell() override
bool is_open() const override
fl::size_t size() const override
fl::size_t read(char *dst, fl::size_t bytesToRead) override
bool seek(fl::size_t pos, seek_dir dir) override
void clear_error() override
const char * error_message() const override
NullFileHandle() FL_NO_EXCEPT=default
bool has_error() const override
fl::size_t write(const char *data, fl::size_t count) override
NullFileSystem() FL_NO_EXCEPT
void end() override
Unmount. Must be safe to call on a backend that never mounted.
bool begin() override
Mount. False if the medium is absent, unformatted, or unreadable.
~NullFileSystem() FL_NO_EXCEPT override
filebuf_ptr openRead(const char *_path) override
Null handle if the file does not exist or cannot be opened.
static bool ParseJson(const char *jsonStrScreenMap, fl::flat_map< string, ScreenMap > *segmentMaps, string *err=nullptr) FL_NO_EXCEPT
void reserve(fl::size newCapacity) FL_NO_EXCEPT
const char * c_str() const FL_NO_EXCEPT
fl::size size() const FL_NO_EXCEPT
virtual bool seek(fl::size_t pos, seek_dir dir)=0
ifstream & read(char *buffer, fl::size_t count)
filebuf_ptr rdbuf() const
bool is_null() const FL_NO_EXCEPT
static json parse(const fl::string &txt) FL_NO_EXCEPT
string & append(const bitset_fixed< N > &bs) FL_NO_EXCEPT
#define FASTLED_UNUSED(x)
FastLED's Elegant JSON Library: fl::json
Centralized logging categories for FastLED hardware interfaces and subsystems.
FramePtr loadJpegFromSD(int cs_pin, const char *filepath, const JpegConfig &config, fl::string *error_message) FL_NO_EXCEPT
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
fl::shared_ptr< filebuf > filebuf_ptr
InputGamut g FL_NO_EXCEPT
Base definition for an LED controller.