Node Js

 Node js Basic CRUD Operation......

/* create a folder and file first.... */
/* now first we create folder with file name data.txt ...*/

const fs = require('fs');
fs.mkdirSync("anish");

/* create a file with filename data.txt ..*/

fs.writeFileSync("data.txt", "Welcome to my file ");

/* you are able to append new things in this file.... */

fs.append("data.txt", "We are file creator");

/* you also rename this file ...*/

fs.renameSync("data.txt", "hello.txt");

/* now finally you delete that file  */

fs.unlinkSync("hello.txt");


Comments

Popular posts from this blog

About RAM

Class and object in c++