Node JS
Node module system :-
● The [Link] module system is a fundamental part of the [Link] architecture, allowing
developers to organise their code into modular and reusable components. It helps in
maintaining clean and manageable codebases by breaking down the application into
smaller, more focused units.
❖ common methods provided by the fs module:
Reading Files
1. [Link]: Reads the entire contents of a file.
2. [Link]: Synchronously reads the entire contents of a file.
Writing Files
3. [Link]: Writes data to a file, replacing the file if it already exists.
4. [Link]: Synchronously writes data to a file, replacing the file if it already
exists.
Updating Files
5. [Link]: Appends data to a file, creating the file if it does not exist.
6. [Link]: Synchronously appends data to a file, creating the file if it does
not exist.
Deleting Files
7. [Link]: Deletes a file.
8. [Link]: Synchronously deletes a file.
Working with Directories
9. [Link]: Creates a new directory.
10. [Link]: Synchronously creates a new directory.
11. [Link]: Reads the contents of a directory.
12. [Link]: Synchronously reads the contents of a directory.