MCPcopy Create free account
hub / github.com/FastLED/FastLED / available

Method available

src/platforms/wasm/fs_wasm.cpp.hpp:144–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 bool is_open() const override { return true; } // always open if we have data
143
144 bool available() const override {
145 if (mPos >= mData->capacity()) {
146 return false;
147 }
148 if (!mData->ready(mPos)) {
149 FL_WARN("File is not ready yet. This is a major error because "
150 "FastLED-wasm does not support async yet, the file "
151 "will fail to read.");
152 return false;
153 }
154 return true;
155 }
156
157 fl::size_t bytes_left() const override {
158 if (!available()) {

Callers

nothing calls this directly

Calls 2

capacityMethod · 0.45
readyMethod · 0.45

Tested by

no test coverage detected