Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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
[src]

§Parameters

§
path: string | URL
[src]
§
data: string
[src]
§
options?: WriteFileOptions optional
[src]

§Return Type