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

Function readvSync

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

Source from the content-addressed store, hash-verified

381 fdatasyncSync: noopFdSync,
382 fsyncSync: noopFdSync,
383 readvSync(fd, buffers, position) {
384 const vfd = getVirtualFd(fd);
385 if (!vfd) return undefined;
386 let totalRead = 0;
387 for (let i = 0; i < buffers.length; i++) {
388 const buf = buffers[i];
389 const pos = position != null ? position + totalRead : position;
390 const bytesRead = vfd.entry.readSync(buf, 0, buf.byteLength, pos);
391 totalRead += bytesRead;
392 if (bytesRead < buf.byteLength) break;
393 }
394 return totalRead;
395 },
396 writevSync(fd, buffers, position) {
397 const vfd = getVirtualFd(fd);
398 if (!vfd) return undefined;

Callers

nothing calls this directly

Calls 2

getVirtualFdFunction · 0.85
readSyncMethod · 0.45

Tested by

no test coverage detected