import file deno code example
Example 1: read file with deno
// async
console.log(await Deno.readTextFile("./file.txt"));
// synv
console.log(Deno.readTextFileSync("./file.txt"));
Example 2: write file with deno
// async
await Deno.writeTextFile("./file.txt", "hello world");
// sync
Deno.writeTextFileSync("./file.txt", "hello world");