From 4a8d25646aa58e3e59d622e69c41822b40415c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 25 Apr 2020 00:45:55 +0200 Subject: BREAKING CHANGE: remove Deno.OpenMode (#4884) This commit removes Deno.OpenMode along with overloaded variants of Deno.open() and Deno.openSync() that used OpenMode. --- std/io/util.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'std/io/util.ts') diff --git a/std/io/util.ts b/std/io/util.ts index 28688ae91..18ddb4def 100644 --- a/std/io/util.ts +++ b/std/io/util.ts @@ -47,6 +47,11 @@ export async function tempFile( `${dir}/${opts.prefix || ""}${r}${opts.postfix || ""}` ); await mkdir(path.dirname(filepath), { recursive: true }); - const file = await open(filepath, "a"); + const file = await open(filepath, { + create: true, + read: true, + write: true, + append: true, + }); return { file, filepath }; } -- cgit v1.2.3