MCPcopy Index your code
hub / github.com/nodejs/node / writevSync

Function writevSync

lib/internal/vfs/setup.js:396–408  ·  view source on GitHub ↗
(fd, buffers, position)

Source from the content-addressed store, hash-verified

394 return totalRead;
395 },
396 writevSync(fd, buffers, position) {
397 const vfd = getVirtualFd(fd);
398 if (!vfd) return undefined;
399 let totalWritten = 0;
400 for (let i = 0; i < buffers.length; i++) {
401 const buf = buffers[i];
402 const pos = position != null ? position + totalWritten : position;
403 const bytesWritten = vfd.entry.writeSync(buf, 0, buf.byteLength, pos);
404 totalWritten += bytesWritten;
405 if (bytesWritten < buf.byteLength) break;
406 }
407 return totalWritten;
408 },
409
410 // ==================== Async FD-based ops ====================
411

Callers 1

writevMethod · 0.50

Calls 2

getVirtualFdFunction · 0.85
writeSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…