Good morning StackOverflow community!
My question is very theoretical this time, I am studying the methods readFile()
and readFileSync()
of the module fs
.
Being the main advantage of nodejs the fact of executing asynchronous operations, I am left wondering why and what it exists for readFileSync()
? Isn't it true that you could treat all cases with readFile()
?
This approach leads me to my most important question: There are cases where it is more convenient to use readFileSync()
instead of readFile()
?
Thanks in advance for your collaboration!