MCPcopy Create free account
hub / github.com/cloudflare/agents / extractTar

Function extractTar

packages/shell/src/extras.ts:199–207  ·  view source on GitHub ↗
(
  bytes: Uint8Array
)

Source from the content-addressed store, hash-verified

197}
198
199export function extractTar(
200 bytes: Uint8Array
201): Array<{ path: string; type: "file" | "directory"; bytes?: Uint8Array }> {
202 return parseTar(bytes).map((entry) =>
203 entry.type === "file"
204 ? { path: entry.path, type: entry.type, bytes: entry.bytes }
205 : { path: entry.path, type: entry.type }
206 );
207}
208
209export type TarInputEntry =
210 | {

Callers 1

extractArchiveMethod · 0.90

Calls 1

parseTarFunction · 0.70

Tested by

no test coverage detected