Node.js fs read text file to buffer

Description

Node.js fs read text file to buffer


var fs = require("fs");
var data = fs.readFileSync('input.txt');
console.log(data.toString());//from  w  ww .  jav  a  2s  .  c o m



PreviousNext

Related