Answers for "how to read a file in deno"

1

write file with deno

// async
await Deno.writeTextFile("./file.txt", "hello world");
// sync
Deno.writeTextFileSync("./file.txt", "hello world");
Posted by: Guest on October-11-2020
1

read file with deno

// async
console.log(await Deno.readTextFile("./file.txt"));
// synv
console.log(Deno.readTextFileSync("./file.txt"));
Posted by: Guest on October-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language