Posted By

BenClayton on 12/22/10


Tagged


Versions (?)

Node.js: Syncronously read a file into a string


 / Published in: JavaScript
 

  1. var fs = require('fs');
  2. var file = fs.readFileSync(path, "utf8");
  3. console.log(file);

Report this snippet  

You need to login to post a comment.