GoConqr has a new look! Let us know what you think.

Module 12 of 22 · Media

Node.js core modules and the filesystem module

Kostas Diakogiannis

Node.js core modules and the filesystem module

 Node.js Core modules and the dealing with files

Node.js is not a web framework, but rather a whole execution environment as we have already mentioned before. That means that it contains also modules that deal with files, talk to databases, collect data from microcontrollers and more.

So how is it possible to read and/or write data from and into a file with node.js. The answer is simple. Through the fs core module that Node.js natively provides. All we need to do is to import the module into our script and make use of the function the module provides. 

During the next chapters we will focus on the basic functions, reading from a file, writing to a file, the synchronous and the asynchronous way. But then if you would like to learn more (how to rename or delete a file programmatically, change permissions and more) you are very welcomed to read the official node.js fs module documentation (this is for the version 10.16.0).

 

 

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?