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

Method read

lib/internal/vfs/file_handle.js:497–500  ·  view source on GitHub ↗

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

(buffer, offset, length, position)

Source from the content-addressed store, hash-verified

495 * @returns {Promise<{ bytesRead: number, buffer: Buffer }>}
496 */
497 async read(buffer, offset, length, position) {
498 const bytesRead = this.readSync(buffer, offset, length, position);
499 return { __proto__: null, bytesRead, buffer };
500 }
501
502 /**
503 * Writes data to the file synchronously.

Callers

nothing calls this directly

Calls 1

readSyncMethod · 0.95

Tested by

no test coverage detected