Spec-Zone.ru › Deno 1

Deno.writeTextFileSync

Synchronously write string data to the given path, by default creating a new file if needed, else overwriting.

Deno.writeTextFileSync("hello1.txt", "Hello world\n");  // overwrite "hello1.txt" or create it

Requires allow-write permission, and allow-read if options.create is false.

function writeTextFileSync(
path: string | URL,
data: string,
options?: WriteFileOptions,
): void;
writeTextFileSync(path: string | URL, data: string, options?: WriteFileOptions): void

Parameters

path: string | URL
data: string
options?: WriteFileOptions optional

Return Type

void

© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/Deno.writeTextFileSync

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API