40 bool is_open()
const override {
return false; }
53 const char *
path()
const override {
return "nullptr filebuf"; }
61 bool is_eof()
const override {
return true; }
71 FL_WARN(
"NullFileSystem instantiated as a placeholder, please "
72 "implement a file system for your platform.");
76 bool begin()
override {
return true; }
77 void end()
override {}
96 mFs = platform_filesystem;
127 FL_WARN(
"Failed to read file: " << path);
129 *error =
"Failed to read file: ";
148 FL_WARN(
"Failed to read file: " << path);
150 *error =
"Failed to read file: ";
169 fl::size nFrameHistory) {
170 Video video(pixelsPerFrame, fps, nFrameHistory);
183 FL_WARN(
"Failed to open file: " << path);
186 fl::size size = file.
size();
191 fl::size n = file.
read(buf,
sizeof(buf));
192 out->
append((
const char *)buf, n);
196 FL_DBG_IF(!wrote,
"Failed to write any data to the output string.");
bool readText(const char *path, string *out)
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)
bool readScreenMaps(const char *path, fl::flat_map< string, ScreenMap > *out, string *error=nullptr)
FsImpl() FL_NOEXCEPT=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
bool has_error() const override
fl::size_t write(const char *data, fl::size_t count) override
NullFileHandle() FL_NOEXCEPT=default
NullFileSystem() FL_NOEXCEPT
~NullFileSystem() FL_NOEXCEPT override
filebuf_ptr openRead(const char *_path) override
static bool ParseJson(const char *jsonStrScreenMap, fl::flat_map< string, ScreenMap > *segmentMaps, string *err=nullptr) FL_NOEXCEPT
void reserve(fl::size newCapacity) FL_NOEXCEPT
const char * c_str() const FL_NOEXCEPT
fl::size size() const FL_NOEXCEPT
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_NOEXCEPT
static json parse(const fl::string &txt) FL_NOEXCEPT
string & append(const bitset_fixed< N > &bs) FL_NOEXCEPT
FastLED's Elegant JSON Library: fl::json
Centralized logging categories for FastLED hardware interfaces and subsystems.
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
fl::shared_ptr< filebuf > filebuf_ptr
Base definition for an LED controller.
#define FASTLED_UNUSED(x)