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

Method writeSync

lib/internal/vfs/file_system.js:619–625  ·  view source on GitHub ↗

* Writes to a file descriptor synchronously. * @param {number} fd The file descriptor * @param {Buffer} buffer The buffer to write from * @param {number} offset The offset in the buffer * @param {number} length The number of bytes to write * @param {number|null} position The position

(fd, buffer, offset, length, position)

Source from the content-addressed store, hash-verified

617 * @returns {number} The number of bytes written
618 */
619 writeSync(fd, buffer, offset, length, position) {
620 const vfd = getVirtualFd(fd);
621 if (!vfd) {
622 throw createEBADF('write');
623 }
624 return vfd.entry.writeSync(buffer, offset, length, position);
625 }
626
627 /**
628 * Gets file stats from a file descriptor synchronously.

Callers

nothing calls this directly

Calls 2

getVirtualFdFunction · 0.85
createEBADFFunction · 0.85

Tested by

no test coverage detected