adspace


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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Is node js losing popularity?

590


How we can read a file in node js?

571