* Synchronously truncates the file descriptor. * @param {number} fd * @param {number} [len] * @returns {void}
(fd, len = 0)
| 1342 | * @returns {void} |
| 1343 | */ |
| 1344 | function ftruncateSync(fd, len = 0) { |
| 1345 | validateInteger(len, 'len'); |
| 1346 | |
| 1347 | const h = vfsState.handlers; |
| 1348 | if (h !== null) { |
| 1349 | const result = h.ftruncateSync(fd, len < 0 ? 0 : len); |
| 1350 | if (result !== undefined) return; |
| 1351 | } |
| 1352 | |
| 1353 | binding.ftruncate(fd, len < 0 ? 0 : len); |
| 1354 | } |
| 1355 | |
| 1356 | function lazyLoadCp() { |
| 1357 | if (cpFn === undefined) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…