What are differences between synchronous and asynchronous method of fs module?



What are differences between synchronous and asynchronous method of fs module?..

Answer / Anshul Agrawal

Synchronous methods block further execution until the operation is complete, while asynchronous methods allow other operations to run concurrently. Examples of synchronous methods in the fs module are fs.readFileSync() and fs.writeFileSync(), while examples of asynchronous methods are fs.readFile() and fs.writeFile().

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Node.js Interview Questions

Explain the working of the control flow function.

1 Answers  


How can we avoid Callback Hell in Node.js?

1 Answers  


How can we control versioning about packages in node.js?

1 Answers  


How to parse json using node.js?

1 Answers  


What is REPL in Node.js?

1 Answers  


What is difference between synchronous and asynchronous method of fs module?

1 Answers  


How to config properties in express js?

1 Answers  


What is a callback in node.js?

1 Answers  


How to run multiple node js files?

1 Answers  


How to create an Http server using Express?

1 Answers  


What are Grunt and Gulp?

1 Answers  


What is the disadvantages of node.js?

1 Answers  


Categories