summaryrefslogtreecommitdiff
path: root/std/archive
diff options
context:
space:
mode:
authorNayeem Rahman <muhammed.9939@gmail.com>2019-12-20 20:21:30 +0000
committerRy Dahl <ry@tinyclouds.org>2019-12-20 15:21:30 -0500
commite8d82a6348d4cf9fc6a023fe16bf75df7fea61b0 (patch)
tree6d9e44694bf55a7e3089b1706dc05919ccc0dc27 /std/archive
parent29562ed61ea42e46c86cef919f27033f6b3427b0 (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')
-rw-r--r--std/archive/mod.ts1
-rw-r--r--std/archive/tar.ts24
2 files changed, 2 insertions, 23 deletions
diff --git a/std/archive/mod.ts b/std/archive/mod.ts
new file mode 100644
index 000000000..254b8266f
--- /dev/null
+++ b/std/archive/mod.ts
@@ -0,0 +1 @@
+export * from "./tar.ts";
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
*/