diff options
author | Nayeem Rahman <muhammed.9939@gmail.com> | 2019-12-20 20:21:30 +0000 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-12-20 15:21:30 -0500 |
commit | e8d82a6348d4cf9fc6a023fe16bf75df7fea61b0 (patch) | |
tree | 6d9e44694bf55a7e3089b1706dc05919ccc0dc27 /std/archive/tar.ts | |
parent | 29562ed61ea42e46c86cef919f27033f6b3427b0 (diff) |
feat: Add missing mod.ts files in std (#3509)
std/archive/tar.ts:
- Remove FileReader.
- Remove FileWriter.
std/encoding/csv.ts:
- ExtendedParseOptions -> ParseOptions
- HeaderOption -> HeaderOptions
- ParseOptions -> ReadOptions
- readAll() -> readMatrix()
std/encoding/yaml.ts:
- DumpOptions -> StringifyOptions
std/fmt/colors.ts:
- getEnabled() -> getColorEnabled()
- setEnabled() -> setColorEnabled()
std/testing/mod.ts:
- Re-export sibling modules.
Diffstat (limited to 'std/archive/tar.ts')
-rw-r--r-- | std/archive/tar.ts | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/std/archive/tar.ts b/std/archive/tar.ts index 8ebfa7fb5..e53cd9111 100644 --- a/std/archive/tar.ts +++ b/std/archive/tar.ts @@ -35,7 +35,7 @@ const ustar = "ustar\u000000"; /** * Simple file reader */ -export class FileReader implements Deno.Reader { +class FileReader implements Deno.Reader { private file?: Deno.File; constructor(private filePath: string, private mode: Deno.OpenMode = "r") {} @@ -54,28 +54,6 @@ export class FileReader implements Deno.Reader { } /** - * Simple file writer (call FileWriter.dispose() after use) - */ -export class FileWriter implements Deno.Writer { - private file?: Deno.File; - - constructor(private filePath: string, private mode: Deno.OpenMode = "w") {} - - public async write(p: Uint8Array): Promise<number> { - if (!this.file) { - this.file = await Deno.open(this.filePath, this.mode); - } - return Deno.write(this.file.rid, p); - } - - public dispose(): void { - if (!this.file) return; - Deno.close(this.file.rid); - this.file = undefined; - } -} - -/** * Remove the trailing null codes * @param buffer */ |