MCPcopy Create free account
hub / github.com/nodejs/node / truncate

Method truncate

lib/internal/vfs/file_handle.js:225–228  ·  view source on GitHub ↗

* Truncates the file. * @param {number} [len] The new length * @returns {Promise }

(len)

Source from the content-addressed store, hash-verified

223 * @returns {Promise<void>}
224 */
225 async truncate(len) {
226 this.#checkClosed('ftruncate');
227 throw new ERR_METHOD_NOT_IMPLEMENTED('truncate');
228 }
229
230 /**
231 * Truncates the file synchronously.

Callers

nothing calls this directly

Calls 1

#checkClosedMethod · 0.95

Tested by

no test coverage detected