Deno.writeTextFile
Записать строку data в заданный path, по умолчанию создавая новый файл при необходимости, иначе перезаписывая.
await Deno.writeTextFile("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it
Требует allow-write разрешения и allow-read, если options.create равно false.
function writeTextFile(path: string | URL,data: string,options?: WriteFileOptions,): Promise<void>;
writeTextFile(path: string | URL, data: string, options?: WriteFileOptions): Promise<void>Тип возвращаемого значения
Promise<void>
© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/Deno.writeTextFile