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

Method read

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

Source from the content-addressed store, hash-verified

83 }
84
85 size_t read(size_t pos, u8 *dst, size_t len) {
86 fl::unique_lock<fl::mutex> lock(mMutex);
87 if (pos >= mData.size()) {
88 return 0;
89 }
90 size_t bytesAvailable = mData.size() - pos;
91 size_t bytesToActuallyRead = fl::min(len, bytesAvailable);
92 fl::memcpy(dst, mData.data() + pos, bytesToActuallyRead);
93 return bytesToActuallyRead;
94 }
95
96 bool ready(size_t pos) {
97 fl::unique_lock<fl::mutex> lock(mMutex);

Callers 3

readMethod · 0.45
nextMethod · 0.45
processFileFunction · 0.45

Calls 3

memcpyFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected