Skip to content

fs: add flush option to writeFile() functions

Rodrigo Muino Tomonari requested to merge github/fork/cjihrig/auto-sync into main

This commit adds a 'flush' option to the fs.writeFile family of functions.

Refs: https://github.com/nodejs/node/issues/49886

Notable change summary: When writing to files, it is possible that data is not immediately flushed to permanent storage. This allows subsequent read operations to see stale data. This PR adds a 'flush' option to the fs.writeFile family of functions which forces the data to be flushed at the end of a successful write operation.

Merge request reports

Loading