summaryrefslogtreecommitdiff
path: root/std/archive
diff options
context:
space:
mode:
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
*/