Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

open file method in node js

var fs = require("fs");
  
// Asynchronous - Open File
console.log("opening file!");
fs.open('input.txt', 'r+', function(err, fd) {
   if (err) {
      return console.error(err);
   }
   console.log("File open successfully");     
});
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #open #file #method #node #js
ADD COMMENT
Topic
Name
9+6 =