summaryrefslogtreecommitdiff
path: root/std/io/util.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/io/util.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/io/util.ts')
-rw-r--r--std/io/util.ts7
1 files changed, 6 insertions, 1 deletions
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 };
}