You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[MEMFS] Assume FS.write is takes a TypedArray. (#26413)
We have higher level wrappers `createDataFile` and `writeFile` which
also accept `Array` and `string`, but it simpler if the lower level APIs
can just assume `TypedArray`.
This simplifies the code and reduces code size. We have assertions to
check this in debug builds.
Followup to #26398 and #26411
}elseif(node.usedBytes===0&&position===0){// If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
285
-
node.contents=buffer.slice(offset,offset+length);
286
-
node.usedBytes=length;
287
-
returnlength;
288
-
}elseif(position+length<=node.usedBytes){// Writing to an already allocated and used subrange of the file?
}elseif(node.usedBytes===0&&position===0){// If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
0 commit comments