Home

Read file to String

library: built in functions library part: open
with open('data.txt', 'r') as file:
    data = file.read().replace('\n', '')
library: io library part: File
placeholder dart open file
library: fs library part: readFileSync
// which syntax to use?? wait until import is standard???
const fs = require("fs");

const html = fs.readFileSync("deteleme.html", { encoding: "utf-8" });
console.log(html);