MCPcopy Create free account
hub / github.com/denoland/std / read

Method read

io/buffer.ts:285–288  ·  view source on GitHub ↗

* Reads the next `p.length` bytes from the buffer or until the buffer is * drained. Resolves to the number of bytes read. If the buffer has no * data to return, resolves to EOF (`null`). * * NOTE: This methods reads bytes synchronously; it's provided for * compatibility with `Reader`

(p: Uint8Array)

Source from the content-addressed store, hash-verified

283 * @returns The number of bytes read.
284 */
285 read(p: Uint8Array): Promise<number | null> {
286 const rr = this.readSync(p);
287 return Promise.resolve(rr);
288 }
289
290 /**
291 * Writes the given data to the buffer.

Callers

nothing calls this directly

Calls 1

readSyncMethod · 0.95

Tested by

no test coverage detected