* 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)
| 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. |
nothing calls this directly
no test coverage detected