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

Function jsInjectFile

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

Source from the content-addressed store, hash-verified

284extern "C" {
285
286EMSCRIPTEN_KEEPALIVE bool jsInjectFile(const char *path, const fl::u8 *data,
287 size_t len) {
288
289 auto inserted = fl::_createIfNotExists(fl::string(path), len);
290 if (!inserted) {
291 FL_WARN("File can only be injected once.");
292 return false;
293 }
294 inserted->append(data, len);
295 return true;
296}
297
298EMSCRIPTEN_KEEPALIVE bool jsAppendFile(const char *path, const fl::u8 *data,
299 size_t len) {

Callers

nothing calls this directly

Calls 3

_createIfNotExistsFunction · 0.85
stringClass · 0.50
appendMethod · 0.45

Tested by

no test coverage detected