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

Method write

lib/internal/vfs/file_handle.js:562–565  ·  view source on GitHub ↗

* Writes data to the file. * @param {Buffer} buffer The buffer to write from * @param {number} offset The offset in the buffer to start reading * @param {number} length The number of bytes to write * @param {number|null} position The position to write to (null uses current position) *

(buffer, offset, length, position)

Source from the content-addressed store, hash-verified

560 * @returns {Promise<{ bytesWritten: number, buffer: Buffer }>}
561 */
562 async write(buffer, offset, length, position) {
563 const bytesWritten = this.writeSync(buffer, offset, length, position);
564 return { __proto__: null, bytesWritten, buffer };
565 }
566
567 /**
568 * Reads the entire file synchronously.

Callers 1

writeFunction · 0.45

Calls 1

writeSyncMethod · 0.95

Tested by

no test coverage detected