* Truncates a file descriptor synchronously. * @param {number} fd The file descriptor * @param {number} [len] The new length
(fd, len = 0)
| 478 | * @param {number} [len] The new length |
| 479 | */ |
| 480 | ftruncateSync(fd, len = 0) { |
| 481 | const vfd = getVirtualFd(fd); |
| 482 | if (!vfd) { |
| 483 | throw createEBADF('ftruncate'); |
| 484 | } |
| 485 | vfd.entry.truncateSync(len); |
| 486 | } |
| 487 | |
| 488 | /** |
| 489 | * Creates a hard link synchronously. |
no test coverage detected