diff --git a/tar/mod.ts b/tar/mod.ts index 6a2734d7d..55a36e956 100644 --- a/tar/mod.ts +++ b/tar/mod.ts @@ -16,7 +16,7 @@ * .pipeThrough(new UntarStream()) * ) { * const path = normalize(entry.path); - * await Deno.mkdir(dirname(path)); + * await Deno.mkdir(dirname(path), { recursive: true }); * await entry.readable?.pipeTo((await Deno.create(path)).writable); * } * ``` diff --git a/tar/untar_stream.ts b/tar/untar_stream.ts index bdfdde31b..308776b57 100644 --- a/tar/untar_stream.ts +++ b/tar/untar_stream.ts @@ -167,7 +167,7 @@ export interface TarStreamEntry { * .pipeThrough(new UntarStream()) * ) { * const path = normalize(entry.path); - * await Deno.mkdir(dirname(path)); + * await Deno.mkdir(dirname(path), { recursive: true }); * await entry.readable?.pipeTo((await Deno.create(path)).writable); * } * ``` @@ -359,7 +359,7 @@ export class UntarStream * .pipeThrough(new UntarStream()) * ) { * const path = normalize(entry.path); - * await Deno.mkdir(dirname(path)); + * await Deno.mkdir(dirname(path), { recursive: true }); * await entry.readable?.pipeTo((await Deno.create(path)).writable); * } * ```