Skip to content

Commit

Permalink
docs(tar): fix example in creating directories (denoland#6113)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackAsLight authored Oct 16, 2024
1 parent d85d0d8 commit 825f311
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tar/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
* }
* ```
Expand Down
4 changes: 2 additions & 2 deletions tar/untar_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
* }
* ```
Expand Down Expand Up @@ -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);
* }
* ```
Expand Down

0 comments on commit 825f311

Please sign in to comment.