* Appends Uint8Array file data to WASM module file system * @param {Object} moduleInstance - The WASM module instance * @param {string} path - File path in the virtual file system * @param {Uint8Array} blob - File data as byte array
(moduleInstance, path, blob)
| 405 | * @param {Uint8Array} blob - File data as byte array |
| 406 | */ |
| 407 | function jsAppendFileUint8(moduleInstance, path, blob) { |
| 408 | const n = moduleInstance.lengthBytesUTF8(path) + 1; |
| 409 | const path_cstr = moduleInstance._malloc(n); |
| 410 | moduleInstance.stringToUTF8(path, path_cstr, n); |
| 411 | const ptr = moduleInstance._malloc(blob.length); |
| 412 | moduleInstance.HEAPU8.set(blob, ptr); |
| 413 | jsAppendFileRaw(moduleInstance, path_cstr, ptr, blob.length); |
| 414 | moduleInstance._free(ptr); |
| 415 | moduleInstance._free(path_cstr); |
| 416 | } |
| 417 | |
| 418 | /** |
| 419 | * Partitions files into immediate and streaming categories based on extensions |
no test coverage detected