import { Deno } from "https://deno.land/x/deno@v1.0.0/cli/js/lib.deno.ns.d.ts";
const { writeTextFile } = Deno;
Asynchronously write string data
to the given path
, by default creating a new file if needed,
else overwriting.
await Deno.writeTextFile("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it
Requires allow-write
permission, and allow-read
if options.create
is false
.