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

Function ftruncate

lib/internal/fs/promises.js:1527–1535  ·  view source on GitHub ↗
(handle, len = 0)

Source from the content-addressed store, hash-verified

1525}
1526
1527async function ftruncate(handle, len = 0) {
1528 validateInteger(len, 'len');
1529 len = MathMax(0, len);
1530 return await PromisePrototypeThen(
1531 binding.ftruncate(handle.fd, len, kUsePromises),
1532 undefined,
1533 handleErrorFromBinding,
1534 );
1535}
1536
1537async function rm(path, options) {
1538 const h = vfsState.handlers;

Callers 1

truncateFunction · 0.70

Calls 1

ftruncateMethod · 0.80

Tested by

no test coverage detected