Skip to main content
Module

std/archive/mod.ts>TarEntry#read

The Deno Standard Library
Latest
method TarEntry.prototype.read
import { TarEntry } from "https://deno.land/std@0.224.0/archive/mod.ts";

Reads up to p.byteLength bytes of the tar entry into p. It resolves to the number of bytes read (0 < n <= p.byteLength) and rejects if any error encountered. Even if read() resolves to n < p.byteLength, it may use all of p as scratch space during the call. If some data is available but not p.byteLength bytes, read() conventionally resolves to what is available instead of waiting for more.

Parameters

p: Uint8Array

Returns

Promise<number | null>