Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/archive/untar.ts>TarEntry

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class TarEntry
implements Reader
import { TarEntry } from "https://deno.land/std@0.220.1/archive/untar.ts";

Contains tar header metadata and a reader to the entry's body.

Constructors

new
TarEntry(
header: TarHeader,
reader: Reader | (Reader & Deno.Seeker),
)

Constructs a new instance.

Properties

readonly
consumed: boolean

Returns whether the entry has already been consumed.

Methods

Discords the current entry.

read(p: Uint8Array): Promise<number | null>

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.

interface TarEntry
import { type TarEntry } from "https://deno.land/std@0.220.1/archive/untar.ts";

Tar entry