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

Method write

io/buffer.ts:338–341  ·  view source on GitHub ↗

* Writes the given data to the buffer. Resolves to the number of bytes * written. * * > [!NOTE] * > This methods writes bytes synchronously; it's provided for compatibility * > with the code Writer interface. * * @example Usage * ```ts * import { Buffer } from "@std

(p: Uint8Array)

Source from the content-addressed store, hash-verified

336 * @returns The number of bytes written.
337 */
338 write(p: Uint8Array): Promise<number> {
339 const n = this.writeSync(p);
340 return Promise.resolve(n);
341 }
342
343 #grow(n: number) {
344 const m = this.length;

Callers

nothing calls this directly

Calls 1

writeSyncMethod · 0.95

Tested by

no test coverage detected