Closed
Description
What is the problem this feature will solve?
I believe it is possible that Node can close a file and then try to interact with the same file before all of the data has been written to disk. According to the docs for close(2)
this can be fixed by calling fsync()
.
What is the feature you are proposing to solve the problem?
Add an option to the appropriate fs
functions (close()
, writeFile()
, etc.) to call fsync()
automatically.
What alternatives have you considered?
Flushing the data "by hand."