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

Function jsAppendFile

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

Source from the content-addressed store, hash-verified

296}
297
298EMSCRIPTEN_KEEPALIVE bool jsAppendFile(const char *path, const fl::u8 *data,
299 size_t len) {
300 auto entry = fl::_findIfExists(fl::string(path));
301 if (!entry) {
302 FL_WARN("File must be declared before it can be appended.");
303 return false;
304 }
305 entry->append(data, len);
306 return true;
307}
308
309EMSCRIPTEN_KEEPALIVE bool jsDeclareFile(const char *path, size_t len) {
310 // declare a file and it's length. But don't fill it in yet

Callers

nothing calls this directly

Calls 3

_findIfExistsFunction · 0.85
stringClass · 0.50
appendMethod · 0.45

Tested by

no test coverage detected