Nodejs-Built-in-FS-Modules
Built-in Modules
These are the native modules that come with Node.js. To use built-in modules, you need not install with npm or other package managers, all you have to do is to require(import) the native module you want to use. There are a lot of these built-in node modules. I will just state and describe a few of them that are often used for development of most applications.
- fs - used to handle file systems.
- http or https - for creating HTTP(S) servers
- events - used to handle events.
- util - used to handle utility functions e.g deprecate, inspect and format.
- buffer - used to handle binary data.
- stream - used to handle streaming data.
- path - provides utilities for working with file and directory paths. To check out the list of all the other Node.js core modules, check out the official documentation here.
- Create a Folder or File
- Read Files
- Renaming Files
- Deleting Files
Using Reading File, u need to create a demo.txt file with some text, then use this code..
here I would like to delete newChangedFile.js