## Node JS program to delete a text file ##
var fs = require ('fs');
fs.unlink ('file.txt', function (err){
if (err) throw err;
console.log (' File deleted successfully!! ');
});
===OUTPUT===
Run the program using the node command:
$ node deleteFile.js
File deleted successfully!!
No comments:
Post a Comment