What are the differences between synchronous and asynchronous methods of the fs module?

Every method in the fs module contains synchronous as well as asynchronous form. Asynchronous methods take the last parameter as completion function callback and the first parameter as an error. It is advisable to use asynchronous methods instead of synchronous methods because asynchronous would never block the program execution, but synchronous may block.

Suggest An Answer

No suggestions avaliable!

Latest post from Node js Interview Questions

Ask Question