summaryrefslogtreecommitdiff
path: root/std/archive/tar.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-04-25 00:45:55 +0200
committerGitHub <noreply@github.com>2020-04-25 00:45:55 +0200
commit4a8d25646aa58e3e59d622e69c41822b40415c46 (patch)
treee228581912bfc0a4bdb56e3caec2ca3a1c1b9087 /std/archive/tar.ts
parent0cb1bb98cc2de8dfe51b7adbe992666936146c90 (diff)
BREAKING CHANGE: remove Deno.OpenMode (#4884)
This commit removes Deno.OpenMode along with overloaded variants of Deno.open() and Deno.openSync() that used OpenMode.
Diffstat (limited to 'std/archive/tar.ts')
-rw-r--r--std/archive/tar.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/archive/tar.ts b/std/archive/tar.ts
index 6bc2b92d0..699b982a9 100644
--- a/std/archive/tar.ts
+++ b/std/archive/tar.ts
@@ -39,15 +39,15 @@ const ustar = "ustar\u000000";
class FileReader implements Deno.Reader {
private file?: Deno.File;
- constructor(private filePath: string, private mode: Deno.OpenMode = "r") {}
+ constructor(private filePath: string) {}
public async read(p: Uint8Array): Promise<number | Deno.EOF> {
if (!this.file) {
- this.file = await Deno.open(this.filePath, this.mode);
+ this.file = await Deno.open(this.filePath, { read: true });
}
const res = await Deno.read(this.file.rid, p);
if (res === Deno.EOF) {
- await Deno.close(this.file.rid);
+ Deno.close(this.file.rid);
this.file = undefined;
}
return res;