Nodejs Utililty Methods File Read

List of utility methods to do File Read

Description

The list of methods to do File Read are organized into topic(s).

Method

fs.readFile
var fs = require("fs");
var x = [];
for (var i = 0; i < 6; i++) {
    x.push([]);
    for (var j=0; j<50; j++) {
        x[i].push(" ");
fs.readFile("l8.txt", "utf8", function (e, d) {
...
fs.readFile
var fs = require('fs');
fs.readFile('rule.txt', function(err, data){
  if (err) {console.log(err);return;}
  var data = data.toString();
  data = data.split(/\n|\r/g).trimNull();
  console.log(data);
});