MCPcopy Create free account
hub / github.com/nodejs/node / processData

Function processData

deps/v8/test/mjsunit/wasm/embenchen/copy.js:3669–3689  ·  view source on GitHub ↗
(byteArray)

Source from the content-addressed store, hash-verified

3667 // of parent and name being that we just join them anyways
3668 var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent;
3669 function processData(byteArray) {
3670 function finish(byteArray) {
3671 if (!dontCreateFile) {
3672 FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);
3673 }
3674 if (onload) onload();
3675 removeRunDependency('cp ' + fullname);
3676 }
3677 var handled = false;
3678 Module['preloadPlugins'].forEach(function(plugin) {
3679 if (handled) return;
3680 if (plugin['canHandle'](fullname)) {
3681 plugin['handle'](byteArray, fullname, finish, function() {
3682 if (onerror) onerror();
3683 removeRunDependency('cp ' + fullname);
3684 });
3685 handled = true;
3686 }
3687 });
3688 if (!handled) finish(byteArray);
3689 }
3690 addRunDependency('cp ' + fullname);
3691 if (typeof url == 'string') {
3692 Browser.asyncLoad(url, function(byteArray) {

Callers 1

copy.jsFile · 0.70

Calls 4

removeRunDependencyFunction · 0.70
finishFunction · 0.70
forEachMethod · 0.65
onerrorFunction · 0.50

Tested by

no test coverage detected